From http://linkinghub.elsevier.com/retrieve/pii/S1877042813021642

In 2003, Zmud, Johanna and Jean Wolf (Zmud,2003,) argued in their paper, that 120 seconds stopping is the right stopping time to cut the chain off, then this threshold have been confirmed by other researchers. According to the statistic of short time activities in French nation travel survey 1994, and the experiences of the data processing, and of the daily life, the threshold, 120 seconds, seems like a good value for us either.

If there is a period that receiver lost the signals of GPS, interval between two points before and after this gap how much time the respondent was in moving and how much time he stopped during the gap. If he is moving during entire gap, then speed should be high. In our daily life, normally, the longer trip, the higher the speed. So we created an empirical threshold function in gap time as follows.

From http://www.atrf.info/papers/2005/2005_stopher_jiang_fitzgerald.pdf

Again, by inspection of known short stops, we found that setting a limit on the change of latitude or longitude to 15 metres (0.00005°), which represents a distance of movement of less than 7 metres, we could be fairly certain of detecting a stop. It is worth noting that most traffic signals in Australia at least have a red-light cycle of less than two minutes.

http://e-collection.library.ethz.ch/view/eth:30636

Activities with ongoing GPS recording are either characterised by speeds that are close to zero (e.g. 8, 15) or by so- called bundles of GPS points (e.g. 23, 21). A bundle is a sequence of GPS points positioned very close to each other, i.e. within a diameter of about 30 metres which equates to approximately thrice the standard deviation of the measurement accuracy (21). Therefore two criteria to detect activities with ongoing recording were established. The first one flags an activity, if the speed is lower than 0.01 m/s for at least 120 seconds and the second, if the point density in a sequence of GPS points is higher than 15 for at least 2/3 of the points and the sequence lasts for at least 10 points or 300 seconds. Thereby, the point density is determined by counting how many of the 30 preceding and succeeding GPS points are positioned within a 15 metres radius around the GPS point in question.

Activities with signal loss are detected by means of the time difference between two con- secutive GPS points. The threshold beyond which it is assumed that an activity took place varies in the literature between 45 (6) and 300 seconds (e.g. 24, 23), whereas most studies apply 120 seconds. In this study, however, a 900 second threshold is used. Compared to former studies this is a high value. But the examination of the GPS points lead to the conclusion that a shorter dwell time would lead to too many wrongly detected activities due to bad reception during trips. As these reception losses will be handled by the map-matching algorithm, they do not need to be considered here.


In [1]:
import emission.storage.decorations.location_queries as lq

In [72]:
reload(lq)


Out[72]:
<module 'emission.storage.decorations.location_queries' from '/Users/shankari/e-mission/e-mission-server/emission/storage/decorations/location_queries.py'>

In [3]:
import emission.analysis.classification.cleaning.location_smoothing as ls

In [4]:
%matplotlib inline

In [5]:
lq.get_uuid_list()


Out[5]:
[u'20150120T081412-0800_0',
 UUID('0763de67-f61e-3f5d-90e7-518e69793954'),
 u'20150120T083030-0800_0',
 u'20150120T092038-0800_0',
 u'20150120T095103-0800_0',
 u'20150120T100601-0800_0',
 u'20150120T081329-0800_0',
 u'20150120T081329-0800_1',
 u'20150120T082726-0800_0',
 u'20150120T084203-0800_0',
 u'20150120T085309-0800_0',
 u'20150120T091130-0800_0',
 u'20150120T164520-0800_0',
 u'20150120T165421-0800_0',
 u'20150120T171905-0800_0',
 u'20150120T173939-0800_0',
 u'20150120T173939-0800_1',
 u'20150120T174712-0800_0',
 u'20150120T175906-0800_0',
 u'20150120T175959-0800_0',
 u'20150120T180100-0800_0',
 u'20150120T180314-0800_0',
 u'20150120T180722-0800_0',
 u'20150120T181201-0800_0',
 u'20150120T180858-0800_0',
 u'20150120T182502-0800_0',
 u'20150120T182415-0800_0',
 u'20150120T184825-0800_0',
 u'20150120T184051-0800_0',
 u'20150120T200648-0800_0',
 u'20150121T081311-0800_0',
 u'20150121T082438-0800_0',
 u'20150121T101156-0800_0',
 u'20150121T120427-0800_0',
 u'20150121T122103-0800_0',
 u'20150121T131523-0800_0',
 u'20150121T151641-0800_0',
 u'20150121T162232-0800_0',
 u'20150121T172104-0800_0',
 u'20150121T172651-0800_0',
 u'20150121T172651-0800_1',
 u'20150121T172651-0800_2',
 u'20150121T173610-0800_0',
 u'20150121T185844-0800_0',
 u'20150121T190818-0800_0',
 u'20150118T132712-0800_0',
 u'20150122T064811-0800_0',
 u'20150122T070032-0800_0',
 u'20150122T070911-0800_0',
 u'20150122T071325-0800_0',
 u'20150122T073710-0800_0',
 u'20150122T082030-0800_0',
 u'20150122T082549-0800_0',
 u'20150122T082835-0800_0',
 u'20150122T084446-0800_0',
 u'20150122T160713-0800_0',
 u'20150122T165916-0800_0',
 u'20150122T174215-0800_0',
 u'20150122T174757-0800_0',
 u'20150122T181004-0800_0',
 u'20150122T182441-0800_0',
 u'20150122T184659-0800_0',
 u'20150122T185844-0800_0',
 u'20150122T185844-0800_1',
 u'20150122T185844-0800_2',
 u'20150123T103544-0800_0',
 u'20150123T122311-0800_0',
 u'20150123T151012-0800_0',
 u'20150123T152516-0800_0',
 u'20150123T165403-0800_0',
 u'20150123T170005-0800_0',
 u'20150123T180202-0800_0',
 u'20150124T094826-0800_0',
 u'20150124T101604-0800_0',
 u'20150124T102701-0800_0',
 u'20150124T104641-0800_0',
 u'20150124T111800-0800_0',
 u'20150124T133437-0800_0',
 u'20150124T134952-0800_0',
 u'20150124T140848-0800_0',
 u'20150124T140847-0800_0',
 u'20150124T144409-0800_0',
 u'20150124T151820-0800_0',
 u'20150124T155407-0800_0',
 u'20150124T164252-0800_0',
 u'20150124T162215-0800_0',
 u'20150122T190510-0800_0',
 u'20150125T095005-0800_0',
 u'20150125T095204-0800_0',
 u'20150125T100025-0800_0',
 u'20150125T113823-0800_0',
 u'20150125T120527-0800_0',
 u'20150125T123252-0800_0',
 u'20150125T124505-0800_0',
 u'20150125T130253-0800_0',
 u'20150125T151754-0800_0',
 u'20150125T154001-0800_0',
 u'20150125T155212-0800_0',
 u'20150125T160154-0800_0',
 u'20150125T161159-0800_0',
 u'20150125T163016-0800_0',
 u'20150125T163234-0800_0',
 u'20150125T170351-0800_0',
 u'20150125T171328-0800_0',
 u'20150125T181411-0800_0',
 u'20150125T175147-0800_0',
 u'20150126T081321-0800_0',
 u'20150126T083322-0800_0',
 u'20150126T084959-0800_0',
 u'20150126T084959-0800_1',
 u'20150126T091401-0800_0',
 u'20150126T150455-0800_0',
 u'20150126T152220-0800_0',
 u'20150126T153535-0800_0',
 u'20150126T163641-0800_0',
 u'20150126T174210-0800_0',
 u'20150126T180019-0800_0',
 u'20150126T180019-0800_1',
 u'20150127T081811-0800_0',
 u'20150127T092641-0800_0',
 u'20150127T093244-0800_0',
 u'20150127T103140-0800_0',
 u'20150127T104713-0800_0',
 u'20150127T110440-0800_0',
 u'20150127T111217-0800_0',
 u'20150127T125449-0800_0',
 u'20150127T124806-0800_0',
 u'20150127T130342-0800_0',
 u'20150127T135707-0800_0',
 u'20150127T141836-0800_0',
 u'20150127T144418-0800_0',
 u'20150127T150321-0800_0',
 u'20150127T150321-0800_1',
 u'20150127T174334-0800_0',
 u'20150127T174752-0800_0',
 u'20150127T180243-0800_0',
 u'20150127T201733-0800_0',
 u'20150127T201711-0800_0',
 u'20150128T081553-0800_0',
 u'20150128T083207-0800_0',
 u'20150128T152518-0800_0',
 u'20150128T160736-0800_0',
 u'20150128T165105-0800_0',
 u'20150128T193329-0800_0',
 u'20150128T212807-0800_0',
 u'20150129T062003-0800_0',
 u'20150129T062003-0800_1',
 u'20150129T064009-0800_0',
 u'20150129T072808-0800_0',
 u'20150129T080541-0800_0',
 u'20150129T080541-0800_1',
 u'20150129T141821-0800_0',
 u'20150129T171000-0800_0',
 u'20150129T171139-0800_0',
 u'20150129T171336-0800_0',
 u'20150129T172542-0800_0',
 u'20150129T175218-0800_0',
 u'20150129T183837-0800_0',
 u'20150129T190151-0800_0',
 u'20150130T081723-0800_0',
 u'20150130T083706-0800_0',
 u'20150130T150855-0800_0',
 u'20150130T160145-0800_0',
 u'20150130T160903-0800_0',
 u'20150130T164943-0800_0',
 u'20150130T175728-0800_0',
 u'20150128T164722-0800_0',
 u'20150128T164722-0800_1',
 u'20150128T164722-0800_2',
 u'20150128T164722-0800_3',
 u'20150128T164722-0800_4',
 u'20150128T164722-0800_5',
 u'20150128T164722-0800_6',
 u'20150128T164722-0800_7',
 u'20150128T164722-0800_8',
 u'20150128T164722-0800_9',
 u'20150128T164722-0800_10',
 u'20150128T164722-0800_11',
 u'20150128T164722-0800_12',
 u'20150128T164722-0800_13',
 u'20150128T164722-0800_14',
 u'20150128T164722-0800_15',
 u'20150128T164722-0800_16',
 u'20150128T164722-0800_17',
 u'20150128T164722-0800_18',
 u'20150128T164722-0800_19',
 u'20150128T164722-0800_20',
 u'20150128T164722-0800_21',
 u'20150128T164722-0800_22',
 u'20150128T164722-0800_23',
 u'20150128T164722-0800_24',
 u'20150128T164722-0800_48',
 u'20150128T164722-0800_53',
 u'20150201T165527-0800_0',
 u'20150201T181623-0800_0',
 u'20150202T083510-0800_0',
 u'20150202T085650-0800_0',
 u'20150202T091925-0800_0',
 u'20150202T092342-0800_0',
 u'20150202T092715-0800_0',
 u'20150202T094801-0800_0',
 u'20150202T101757-0800_0',
 u'20150202T102910-0800_0',
 u'20150202T104222-0800_0',
 u'20150202T110531-0800_0',
 u'20150202T113227-0800_0',
 u'20150202T114217-0800_0',
 u'20150202T121001-0800_0',
 u'20150202T121543-0800_0',
 u'20150202T121958-0800_0',
 u'20150202T122411-0800_0',
 u'20150202T131115-0800_0',
 u'20150202T132900-0800_0',
 u'20150202T133540-0800_0',
 u'20150202T135414-0800_0',
 u'20150202T141728-0800_0',
 u'20150202T164156-0800_0',
 u'20150202T165841-0800_0',
 u'20150202T172337-0800_0',
 u'20150202T172337-0800_1',
 u'20150202T175524-0800_0',
 u'20150203T080816-0800_0',
 u'20150203T081500-0800_0',
 u'20150203T081500-0800_1',
 u'20150203T083321-0800_0',
 u'20150203T082402-0800_0',
 u'20150203T085836-0800_0',
 u'20150203T091556-0800_0',
 u'20150203T094431-0800_0',
 u'20150203T094431-0800_1',
 u'20150203T103508-0800_0',
 u'20150203T153000-0800_0',
 u'20150203T160936-0800_0',
 u'20150203T162355-0800_0',
 u'20150203T164945-0800_0',
 u'20150203T213923-0800_0',
 u'20150203T214945-0800_0',
 u'20150203T221154-0800_0',
 u'20150204T080039-0800_0',
 u'20150204T083134-0800_0',
 u'20150204T085308-0800_0',
 u'20150204T085841-0800_0',
 u'20150204T164656-0800_0',
 u'20150204T172037-0800_0',
 u'20150204T173818-0800_0',
 u'20150204T184634-0800_0',
 u'20150204T184634-0800_1',
 u'20150204T184634-0800_2',
 u'20150204T190516-0800_0',
 u'20150203T230838-0800_0',
 u'20150203T230838-0800_2',
 u'20150203T230838-0800_3',
 u'20150205T060453-0800_0',
 u'20150205T060912-0800_0',
 u'20150205T063337-0800_0',
 u'20150205T070356-0800_0',
 u'20150205T070748-0800_0',
 u'20150205T073847-0800_0',
 u'20150205T074106-0800_0',
 u'20150205T074416-0800_0',
 u'20150205T081250-0800_0',
 u'20150205T083138-0800_0',
 u'20150205T085922-0800_0',
 u'20150205T123403-0800_0',
 u'20150205T124712-0800_0',
 u'20150205T142720-0800_0',
 u'20150205T143645-0800_0',
 u'20150205T164025-0800_0',
 u'20150205T171017-0800_0',
 u'20150205T173218-0800_0',
 u'20150205T175435-0800_0',
 u'20150205T171416-0800_0',
 u'20150205T171416-0800_1',
 u'20150205T174048-0800_0',
 u'20150205T175044-0800_0',
 u'20150205T180129-0800_0',
 u'20150205T181926-0800_0',
 u'20150205T183338-0800_0',
 u'20150205T183338-0800_1',
 u'20150205T201041-0800_0',
 u'20150206T075754-0800_0',
 u'20150206T151117-0800_0',
 u'20150206T151854-0800_0',
 u'20150206T152418-0800_0',
 u'20150206T164658-0800_0',
 u'20150206T165602-0800_0',
 u'20150206T175525-0800_0',
 u'20150208T173442-0800_0',
 u'20150208T174230-0800_0',
 u'20150208T175449-0800_0',
 u'20150209T081755-0800_0',
 u'20150209T083541-0800_0',
 u'20150209T125454-0800_0',
 u'20150209T151115-0800_0',
 u'20150209T152642-0800_0',
 u'20150209T152642-0800_1',
 u'20150210T081913-0800_0',
 u'20150210T081913-0800_1',
 u'20150210T085240-0800_0',
 u'20150210T085240-0800_1',
 u'20150210T092054-0800_0',
 u'20150210T094350-0800_0',
 u'20150210T103351-0800_0',
 u'20150210T105955-0800_0',
 u'20150210T161113-0800_0',
 u'20150210T162634-0800_0',
 u'20150210T172205-0800_0',
 u'20150210T173440-0800_0',
 u'20150210T173440-0800_1',
 u'20150210T183308-0800_0',
 u'20150210T204353-0800_0',
 u'20150211T143326-0800_0',
 u'20150211T150256-0800_0',
 u'20150211T155255-0800_0',
 u'20150211T155725-0800_0',
 u'20150211T155725-0800_1',
 u'20150211T164806-0800_0',
 u'20150211T165451-0800_0',
 u'20150211T165900-0800_0',
 u'20150212T155124-0800_0',
 u'20150212T163540-0800_0',
 u'20150212T170906-0800_0',
 u'20150212T172524-0800_0',
 u'20150212T173004-0800_0',
 u'20150212T175602-0800_0',
 u'20150212T181025-0800_0',
 u'20150212T181613-0800_0',
 u'20150212T183432-0800_0',
 u'20150212T183432-0800_1',
 u'20150212T190910-0800_0',
 u'20150212T192106-0800_0',
 u'20150213T082343-0800_0',
 u'20150213T150311-0800_0',
 u'20150213T151718-0800_0',
 u'20150213T152223-0800_0',
 u'20150213T165226-0800_0',
 u'20150213T180433-0800_0',
 u'20150214T100527-0800_0',
 u'20150214T101204-0800_0',
 u'20150214T112154-0800_0',
 u'20150217T081505-0800_0',
 u'20150217T082536-0800_0',
 u'20150217T092045-0800_0',
 u'20150217T092045-0800_1',
 u'20150217T095811-0800_0',
 u'20150217T100058-0800_0',
 u'20150217T100356-0800_0',
 u'20150217T101651-0800_0',
 u'20150217T101651-0800_1',
 u'20150217T163535-0800_0',
 u'20150217T163535-0800_1',
 u'20150217T163535-0800_2',
 u'20150217T170457-0800_0',
 u'20150217T171126-0800_0',
 u'20150217T204003-0800_0',
 u'20150217T204003-0800_1',
 u'20150217T204003-0800_2',
 u'20150217T211226-0800_0',
 u'20150217T221840-0800_0',
 u'20150218T073609-0800_0',
 u'20150218T075358-0800_0',
 u'20150218T075358-0800_1',
 u'20150218T075358-0800_2',
 u'20150218T075358-0800_3',
 u'20150218T101925-0800_0',
 u'20150218T104659-0800_0',
 u'20150218T112328-0800_0',
 u'20150218T113543-0800_0',
 u'20150218T123059-0800_0',
 u'20150218T174322-0800_0',
 u'20150218T174322-0800_1',
 u'20150218T174322-0800_2',
 u'20150218T174322-0800_3',
 u'20150218T174322-0800_4',
 u'20150218T184016-0800_0',
 u'20150218T185218-0800_0',
 u'20150219T054950-0800_0',
 u'20150219T060013-0800_0',
 u'20150219T064103-0800_0',
 u'20150219T070406-0800_0',
 u'20150219T071938-0800_0',
 u'20150219T072818-0800_0',
 u'20150219T072955-0800_0',
 u'20150219T072955-0800_1',
 u'20150219T083654-0800_0',
 u'20150219T093725-0800_0',
 u'20150219T093725-0800_1',
 u'20150219T144929-0800_0',
 u'20150219T145743-0800_0',
 u'20150219T171436-0800_0',
 u'20150219T172823-0800_0',
 u'20150219T174803-0800_0',
 u'20150219T180237-0800_0',
 u'20150219T180237-0800_1',
 u'20150219T180212-0800_0',
 u'20150219T183212-0800_0',
 u'20150219T190451-0800_0',
 u'20150220T073553-0800_0',
 u'20150220T074958-0800_0',
 u'20150220T074958-0800_1',
 u'20150220T081332-0800_0',
 u'20150220T081332-0800_1',
 u'20150220T105500-0800_0',
 u'20150220T110649-0800_0',
 u'20150220T114522-0800_0',
 u'20150220T122008-0700_0',
 u'20150220T122008-0700_1',
 u'20150220T130331-0700_0',
 u'20150220T131310-0700_0',
 u'20150220T153759-0700_0',
 u'20150220T173451-0700_0',
 u'20150220T175929-0700_0',
 u'20150220T174336-0800_0',
 u'20150220T174336-0800_1',
 u'20150220T180752-0800_0',
 u'20150220T180752-0800_1',
 u'20150220T180752-0800_2',
 u'20150220T184306-0800_0',
 u'20150220T191831-0800_0',
 u'20150221T095223-0800_0',
 u'20150221T095422-0800_0',
 u'20150221T095422-0800_1',
 u'20150221T100613-0800_0',
 u'20150221T100613-0800_1',
 u'20150221T104910-0800_0',
 u'20150221T104910-0800_1',
 u'20150222T094602-0800_0',
 u'20150222T094602-0800_1',
 u'20150222T112711-0800_0',
 u'20150222T115142-0800_0',
 u'20150222T115142-0800_1',
 u'20150222T120511-0800_0',
 u'20150222T121155-0800_0',
 u'20150222T121214-0800_0',
 u'20150222T123711-0800_0',
 u'20150222T123655-0800_0',
 u'20150222T170725-0800_0',
 u'20150222T170725-0800_1',
 u'20150223T081254-0800_0',
 u'20150223T081819-0800_0',
 u'20150223T083358-0800_0',
 u'20150223T084759-0800_0',
 u'20150223T084759-0800_1',
 u'20150223T091901-0800_0',
 u'20150223T092846-0800_0',
 u'20150223T093617-0800_0',
 u'20150223T112811-0800_0',
 u'20150223T112939-0800_0',
 u'20150223T141346-0700_0',
 u'20150223T150117-0800_0',
 u'20150223T151718-0800_0',
 u'20150223T160253-0800_0',
 u'20150223T174122-0700_0',
 u'20150223T174920-0700_0',
 u'20150223T165437-0800_0',
 u'20150223T175102-0700_0',
 u'20150223T175102-0700_1',
 u'20150223T180356-0700_0',
 u'20150223T181654-0700_0',
 u'20150223T181654-0700_1',
 u'20150223T183627-0700_0',
 u'20150223T185224-0700_0',
 u'20150223T184437-0800_0',
 u'20150223T191148-0700_0',
 u'20150223T191148-0700_1',
 u'20150223T194354-0700_0',
 u'20150223T195329-0700_0',
 u'20150223T190844-0800_0',
 u'20150224T071615-0700_0',
 u'20150224T081622-0800_0',
 u'20150224T084422-0800_0',
 u'20150224T092952-0800_0',
 u'20150224T092952-0800_1',
 u'20150224T101506-0800_0',
 u'20150224T102158-0800_0',
 u'20150224T071856-0800_0',
 u'20150224T081849-0800_0',
 u'20150224T081849-0800_1',
 u'20150224T083341-0800_0',
 u'20150224T083341-0800_1',
 u'20150224T153341-0800_0',
 u'20150224T175629-0800_0',
 u'20150224T194122-0800_0',
 u'20150224T194122-0800_1',
 u'20150224T201052-0800_0',
 u'20150224T202348-0800_0',
 u'20150224T204110-0800_0',
 u'20150224T210728-0800_0',
 u'20150224T210728-0800_1',
 u'20150225T081532-0800_0',
 u'20150225T082332-0800_0',
 u'20150225T082332-0800_1',
 u'20150225T083628-0800_0',
 u'20150225T082849-0800_0',
 u'20150225T082849-0800_1',
 u'20150225T083840-0800_0',
 u'20150225T083840-0800_1',
 u'20150225T091508-0800_0',
 u'20150225T085712-0800_0',
 u'20150225T095624-0800_0',
 u'20150225T100142-0800_0',
 u'20150225T100851-0800_0',
 u'20150225T101812-0800_0',
 u'20150225T102812-0800_0',
 u'20150225T111653-0800_0',
 u'20150225T112543-0800_0',
 u'20150225T115118-0800_0',
 u'20150225T120244-0800_0',
 u'20150225T121329-0800_0',
 u'20150225T124818-0800_0',
 u'20150225T130154-0800_0',
 u'20150225T142128-0800_0',
 u'20150225T142128-0800_1',
 u'20150225T151139-0800_0',
 u'20150225T151139-0800_1',
 u'20150225T151139-0800_2',
 u'20150225T152951-0800_0',
 u'20150225T153451-0800_0',
 u'20150225T161813-0800_0',
 u'20150225T171247-0800_0',
 u'20150225T173446-0800_0',
 u'20150225T171446-0800_0',
 u'20150225T182043-0800_0',
 u'20150225T182318-0800_0',
 u'20150225T185235-0800_0',
 u'20150225T185235-0800_1',
 u'20150225T185235-0800_2',
 u'20150225T212839-0800_0',
 u'20150225T214525-0800_0',
 u'20150225T214754-0800_0',
 u'20150225T215339-0800_0',
 u'20150226T010848-0800_0',
 u'20150226T013330-0800_0',
 u'20150226T054553-0800_0',
 u'20150226T054553-0800_1',
 u'20150226T055857-0800_0',
 u'20150226T063344-0800_0',
 u'20150226T065622-0800_0',
 u'20150226T065622-0800_1',
 u'20150226T073047-0800_0',
 u'20150226T073347-0800_0',
 u'20150226T080820-0800_0',
 u'20150226T081713-0800_0',
 u'20150226T081713-0800_1',
 u'20150226T083803-0800_0',
 u'20150226T083803-0800_1',
 u'20150226T100548-0800_0',
 u'20150226T130829-0800_0',
 u'20150226T131540-0800_0',
 u'20150226T131045-0800_0',
 u'20150226T135933-0800_0',
 u'20150226T145204-0800_0',
 u'20150226T150824-0800_0',
 u'20150226T150842-0800_0',
 u'20150226T151801-0800_0',
 u'20150226T161332-0800_0',
 u'20150226T160744-0800_0',
 u'20150226T160744-0800_1',
 u'20150226T162050-0800_0',
 u'20150226T162809-0800_0',
 u'20150226T163444-0800_0',
 u'20150226T165023-0800_0',
 u'20150226T170123-0800_0',
 u'20150226T171244-0800_0',
 u'20150226T172154-0800_0',
 u'20150226T174348-0800_0',
 u'20150226T172307-0800_0',
 u'20150226T175516-0800_0',
 u'20150226T174608-0800_0',
 u'20150226T175940-0800_0',
 u'20150226T175506-0800_0',
 u'20150226T181158-0800_0',
 u'20150226T180853-0800_0',
 u'20150226T191612-0800_0',
 u'20150226T193418-0800_0',
 u'20150226T182413-0800_0',
 u'20150226T194434-0800_0',
 u'20150226T201403-0800_0',
 u'20150226T204210-0800_0',
 u'20150227T075843-0800_0',
 u'20150227T080057-0800_0',
 u'20150227T080250-0800_0',
 u'20150227T080448-0800_0',
 u'20150227T073546-0800_0',
 u'20150227T073546-0800_1',
 u'20150227T074858-0800_0',
 u'20150227T074858-0800_1',
 u'20150227T081536-0800_0',
 u'20150227T082639-0800_0',
 u'20150227T083951-0800_0',
 u'20150227T083951-0800_1',
 u'20150227T083244-0800_0',
 u'20150227T081611-0800_0',
 u'20150227T083530-0800_0',
 u'20150227T092410-0800_0',
 u'20150227T093717-0800_0',
 u'20150227T094809-0800_0',
 u'20150227T102738-0800_0',
 u'20150227T112541-0800_0',
 u'20150227T122327-0800_0',
 u'20150227T122521-0800_0',
 u'20150227T123853-0800_0',
 u'20150227T125042-0800_0',
 u'20150227T133835-0800_0',
 u'20150227T134446-0800_0',
 u'20150227T140847-0800_0',
 u'20150227T151821-0800_0',
 u'20150227T155700-0800_0',
 u'20150227T161702-0800_0',
 u'20150227T164348-0800_0',
 u'20150227T171054-0800_0',
 u'20150227T175905-0800_0',
 u'20150227T181021-0800_0',
 u'20150227T181521-0800_0',
 u'20150227T183815-0800_0',
 u'20150227T180052-0800_0',
 u'20150227T183003-0800_0',
 u'20150227T185110-0800_0',
 u'20150227T185110-0800_1',
 u'20150227T192145-0800_0',
 u'20150227T194150-0800_0',
 u'20150227T190846-0800_0',
 u'20150227T190846-0800_1',
 u'20150227T190846-0800_2',
 u'20150227T190846-0800_3',
 u'20150227T200533-0800_0',
 u'20150227T204526-0800_0',
 u'20150227T212144-0800_0',
 u'20150228T090004-0800_0',
 u'20150228T090733-0800_0',
 u'20150228T091203-0800_0',
 u'20150228T110602-0800_0',
 u'20150228T113542-0800_0',
 u'20150228T114350-0800_0',
 u'20150228T114350-0800_1',
 u'20150228T120827-0800_0',
 u'20150228T095031-0800_0',
 u'20150228T095943-0800_0',
 u'20150228T095943-0800_1',
 u'20150228T125328-0800_0',
 u'20150228T125328-0800_1',
 u'20150228T130813-0800_0',
 u'20150228T131917-0800_0',
 u'20150228T143034-0800_0',
 u'20150228T154705-0800_0',
 u'20150228T155009-0800_0',
 u'20150228T160502-0800_0',
 u'20150228T161154-0800_0',
 u'20150228T161902-0800_0',
 u'20150228T165816-0800_0',
 u'20150228T182012-0800_0',
 u'20150228T220008-0800_0',
 u'20150228T220245-0800_0',
 u'20150228T222531-0800_0',
 u'20150228T224034-0800_0',
 u'20150301T092930-0800_0',
 u'20150301T094814-0800_0',
 u'20150301T094814-0800_1',
 u'20150301T105708-0800_0',
 u'20150301T113740-0800_0',
 u'20150301T114050-0800_0',
 u'20150301T114509-0800_0',
 u'20150301T115032-0800_0',
 u'20150301T120734-0800_0',
 u'20150301T133229-0800_0',
 u'20150301T124244-0800_0',
 u'20150301T165733-0800_0',
 u'20150301T172705-0800_0',
 u'20150301T173833-0800_0',
 u'20150301T181506-0800_0',
 u'20150301T191503-0800_0',
 u'20150301T202847-0800_0',
 u'20150301T202847-0800_1',
 u'20150301T214259-0800_0',
 u'20150301T225404-0800_0',
 u'20150302T072447-0800_0',
 u'20150302T074710-0800_0',
 u'20150302T075045-0800_0',
 u'20150302T075436-0800_0',
 u'20150302T080743-0800_0',
 u'20150302T073456-0800_0',
 u'20150302T073456-0800_1',
 u'20150302T075245-0800_0',
 u'20150302T075245-0800_1',
 u'20150302T081303-0800_0',
 u'20150302T081303-0800_1',
 u'20150302T090736-0800_0',
 u'20150302T093434-0800_0',
 u'20150302T121739-0800_0',
 u'20150302T134303-0800_0',
 u'20150302T135336-0800_0',
 u'20150302T135750-0800_0',
 u'20150302T140240-0800_0',
 u'20150302T142353-0800_0',
 u'20150302T152037-0800_0',
 u'20150302T152037-0800_1',
 u'20150302T155301-0800_0',
 u'20150302T161957-0800_0',
 u'20150302T163631-0800_0',
 u'20150302T170004-0800_0',
 u'20150302T170004-0800_1',
 u'20150302T171918-0800_0',
 u'20150302T173240-0800_0',
 u'20150302T173240-0800_1',
 u'20150302T174946-0800_0',
 u'20150302T174708-0800_0',
 u'20150302T175222-0800_0',
 u'20150302T175642-0800_0',
 u'20150302T175642-0800_1',
 u'20150302T180436-0800_0',
 u'20150302T190047-0800_0',
 u'20150302T192236-0800_0',
 u'20150302T192646-0800_0',
 u'20150302T193057-0800_0',
 u'20150303T061045-0800_0',
 u'20150303T070104-0800_0',
 u'20150303T073809-0800_0',
 u'20150303T075618-0800_0',
 u'20150303T081625-0800_0',
 u'20150303T081625-0800_1',
 u'20150303T081625-0800_2',
 u'20150303T081625-0800_3',
 u'20150303T081625-0800_4',
 u'20150303T084558-0800_0',
 u'20150303T090950-0800_0',
 u'20150303T090432-0800_0',
 u'20150303T090432-0800_1',
 u'20150303T093258-0800_0',
 u'20150303T103635-0800_0',
 u'20150303T100055-0800_0',
 u'20150303T100055-0800_1',
 u'20150303T100055-0800_2',
 u'20150303T112333-0800_0',
 u'20150303T114650-0800_0',
 u'20150303T120117-0800_0',
 u'20150303T120843-0800_0',
 u'20150303T125611-0800_0',
 u'20150303T130323-0800_0',
 u'20150303T133827-0800_0',
 u'20150303T134124-0800_0',
 u'20150303T135016-0800_0',
 u'20150303T143532-0800_0',
 u'20150303T145704-0800_0',
 u'20150303T151323-0800_0',
 u'20150303T155243-0800_0',
 u'20150303T163101-0800_0',
 u'20150303T163729-0800_0',
 u'20150303T163527-0800_0',
 u'20150303T164030-0800_0',
 u'20150303T164158-0800_0',
 u'20150303T164805-0800_0',
 u'20150303T170036-0800_0',
 u'20150303T175432-0800_0',
 u'20150303T175954-0800_0',
 u'20150303T183449-0800_0',
 u'20150303T185052-0800_0',
 u'20150303T190707-0800_0',
 u'20150303T193938-0800_0',
 u'20150303T201144-0800_0',
 u'20150303T203655-0800_0',
 u'20150303T204253-0800_0',
 u'20150303T204253-0800_1',
 u'20150303T210555-0800_0',
 u'20150303T214721-0800_0',
 u'20150303T214721-0800_1',
 u'20150303T220758-0800_0',
 u'20150303T220758-0800_1',
 u'20150304T072017-0800_0',
 u'20150304T074115-0800_0',
 u'20150304T113936-0800_0',
 u'20150304T141929-0800_0',
 u'20150304T141929-0800_1',
 u'20150304T150408-0800_0',
 u'20150304T131721-0800_0',
 u'20150304T132103-0800_0',
 u'20150304T152355-0800_0',
 u'20150304T152355-0800_1',
 u'20150304T132518-0800_0',
 u'20150304T153949-0800_0',
 u'20150304T161210-0800_0',
 u'20150304T162403-0800_0',
 u'20150304T162952-0800_0',
 u'20150304T164120-0800_0',
 u'20150305T004034-0500_0',
 u'20150305T004641-0500_0',
 u'20150305T004641-0500_1',
 u'20150305T004641-0500_2',
 u'20150305T010256-0500_0',
 u'20150305T010826-0500_0',
 u'20150305T011317-0500_0',
 u'20150305T065709-0500_0',
 u'20150305T073937-0500_0',
 u'20150305T073937-0500_1',
 u'20150305T053733-0800_0',
 u'20150305T055053-0800_0',
 u'20150305T055536-0800_0',
 u'20150305T060021-0800_0',
 u'20150305T065429-0800_0',
 u'20150305T072141-0800_0',
 u'20150305T072141-0800_1',
 u'20150305T075700-0800_0',
 u'20150305T080049-0800_0',
 u'20150305T085322-0800_0',
 u'20150305T171111-0500_0',
 u'20150305T171111-0500_1',
 u'20150305T175605-0500_0',
 u'20150305T180101-0500_0',
 u'20150305T194441-0500_0',
 u'20150305T200321-0500_0',
 u'20150305T200801-0500_0',
 u'20150305T201549-0500_0',
 u'20150305T202104-0500_0',
 u'20150305T202615-0500_0',
 u'20150305T203127-0500_0',
 u'20150305T204756-0500_0',
 u'20150305T171452-0800_0',
 u'20150305T173806-0800_0',
 u'20150305T175935-0800_0',
 u'20150305T175935-0800_1',
 u'20150305T175935-0800_2',
 u'20150305T175935-0800_3',
 u'20150305T175935-0800_4',
 u'20150305T191828-0800_0',
 u'20150305T192252-0800_0',
 u'20150305T175338-0800_0',
 u'20150305T175338-0800_1',
 u'20150306T000516-0800_0',
 u'20150306T001716-0800_0',
 u'20150306T002442-0800_0',
 u'20150306T002749-0800_0',
 u'20150306T002749-0800_1',
 u'20150306T010914-0800_0',
 u'20150306T072152-0800_0',
 u'20150306T073815-0800_0',
 u'20150306T081036-0800_0',
 u'20150306T081425-0800_0',
 u'20150306T082306-0800_0',
 u'20150306T082718-0800_0',
 u'20150306T083128-0800_0',
 u'20150306T083625-0800_0',
 u'20150306T084110-0800_0',
 u'20150306T084556-0800_0',
 u'20150306T085016-0800_0',
 u'20150306T084131-0800_0',
 u'20150306T095829-0800_0',
 u'20150306T124106-0800_0',
 u'20150306T132040-0800_0',
 u'20150306T132508-0800_0',
 u'20150306T133039-0800_0',
 u'20150306T133833-0800_0',
 u'20150306T141352-0800_0',
 u'20150306T142101-0800_0',
 u'20150306T142413-0800_0',
 u'20150306T153848-0800_0',
 u'20150306T181858-0800_0',
 u'20150306T185112-0800_0',
 u'20150306T200846-0800_0',
 u'20150306T210255-0800_0',
 u'20150306T210835-0800_0',
 u'20150306T211848-0800_0',
 u'20150307T082843-0800_0',
 u'20150307T083222-0800_0',
 u'20150307T083529-0800_0',
 u'20150307T085120-0800_0',
 u'20150307T091505-0800_0',
 u'20150307T093250-0800_0',
 u'20150307T094954-0800_0',
 u'20150307T100601-0800_0',
 u'20150307T131457-0800_0',
 u'20150307T134229-0800_0',
 u'20150307T134523-0800_0',
 u'20150307T134744-0800_0',
 u'20150307T135005-0800_0',
 u'20150307T161354-0800_0',
 u'20150307T164435-0800_0',
 u'20150307T170418-0800_0',
 u'20150307T170418-0800_1',
 u'20150307T183743-0800_0',
 u'20150307T184015-0800_0',
 u'20150307T184322-0800_0',
 u'20150307T212641-0800_0',
 u'20150308T090604-0700_0',
 u'20150308T091910-0700_0',
 u'20150308T095532-0700_0',
 u'20150308T101929-0700_0',
 u'20150308T105200-0700_0',
 u'20150308T122908-0700_0',
 u'20150308T130647-0700_0',
 u'20150308T133105-0700_0',
 u'20150308T133355-0700_0',
 u'20150309T161101-0700_0',
 u'20150309T161101-0700_1',
 u'20150309T162635-0700_0',
 u'20150309T163853-0700_0',
 u'20150309T172136-0700_0',
 u'20150309T173103-0700_0',
 u'20150310T081553-0700_0',
 u'20150310T081553-0700_1',
 u'20150310T083039-0700_0',
 u'20150310T083039-0700_1',
 u'20150310T083039-0700_2',
 u'20150310T085940-0700_0',
 u'20150310T085940-0700_1',
 u'20150310T093528-0700_0',
 u'20150310T095654-0700_0',
 u'20150310T095654-0700_1',
 u'20150310T104346-0700_0',
 u'20150310T105002-0700_0',
 u'20150310T112557-0700_0',
 u'20150310T162828-0700_0',
 u'20150310T170723-0700_0',
 u'20150310T204439-0700_0',
 u'20150310T204439-0700_1',
 u'20150310T210256-0700_0',
 u'20150310T212237-0700_0',
 u'20150310T214016-0700_0',
 u'20150310T214908-0700_0',
 u'20150310T220547-0700_0',
 u'20150310T220547-0700_1',
 u'20150311T150803-0700_0',
 u'20150311T152625-0700_0',
 u'20150311T170759-0700_0',
 u'20150311T171451-0700_0',
 u'20150311T171451-0700_1',
 u'20150311T174106-0700_0',
 u'20150311T183721-0700_0',
 u'20150311T184830-0700_0',
 u'20150311T190827-0700_0',
 u'20150312T000316-0700_0',
 u'20150312T055338-0700_0',
 u'20150312T055338-0700_1',
 u'20150312T055338-0700_2',
 u'20150312T063331-0700_0',
 u'20150312T065414-0700_0',
 u'20150312T065753-0700_0',
 u'20150312T071941-0700_0',
 u'20150312T071941-0700_1',
 u'20150312T140613-0700_0',
 u'20150312T165552-0700_0',
 u'20150312T172207-0700_0',
 u'20150312T172207-0700_1',
 u'20150312T175009-0700_0',
 u'20150312T180013-0700_0',
 u'20150312T183204-0700_0',
 u'20150312T192059-0700_0',
 u'20150312T202656-0700_0',
 u'20150312T210643-0700_0',
 u'20150312T213320-0700_0',
 u'20150312T221138-0700_0',
 u'20150313T074622-0700_0',
 u'20150313T074905-0700_0',
 u'20150313T075151-0700_0',
 u'20150313T081606-0700_0',
 u'20150313T081916-0700_0',
 u'20150313T083823-0700_0',
 u'20150313T083823-0700_1',
 u'20150313T084323-0700_0',
 u'20150313T103146-0700_0',
 u'20150313T111447-0700_0',
 u'20150313T112610-0700_0',
 u'20150313T132222-0700_0',
 u'20150313T133304-0700_0',
 u'20150313T140244-0700_0',
 u'20150313T140646-0700_0',
 u'20150313T141047-0700_0',
 u'20150313T141448-0700_0',
 u'20150313T141853-0700_0',
 u'20150313T142339-0700_0',
 u'20150313T142741-0700_0',
 u'20150313T143142-0700_0',
 u'20150313T143543-0700_0',
 u'20150313T143946-0700_0',
 u'20150313T144418-0700_0',
 u'20150313T144820-0700_0',
 u'20150313T150323-0700_0',
 u'20150313T151315-0700_0',
 u'20150313T154107-0700_0',
 u'20150313T164959-0700_0',
 u'20150313T172305-0700_0',
 u'20150313T180001-0700_0',
 u'20150313T200405-0700_0',
 u'20150313T203623-0700_0',
 u'20150313T211020-0700_0',
 u'20150314T082755-0700_0',
 u'20150314T094152-0700_0',
 u'20150314T095417-0700_0',
 u'20150314T100502-0700_0',
 u'20150314T100435-0700_0',
 u'20150314T102721-0700_0',
 u'20150314T102721-0700_1',
 u'20150314T105252-0700_0',
 u'20150314T104900-0700_0',
 u'20150314T111223-0700_0',
 u'20150314T111052-0700_0',
 u'20150314T114005-0700_0',
 u'20150314T114531-0700_0',
 u'20150314T114713-0700_0',
 u'20150314T121443-0700_0',
 u'20150314T122851-0700_0',
 u'20150314T124419-0700_0',
 ...]

In [6]:
import datetime as pydt

In [7]:
import pytz

In [8]:
get_jan_dt = lambda date: pydt.datetime(2015,7,date,tzinfo=pytz.timezone("America/Los_Angeles"))

In [9]:
get_jul_dt = lambda date: pydt.datetime(2015,7,date,tzinfo=pytz.timezone("America/Los_Angeles"))

In [10]:
import emission.analysis.plotting.leaflet_osm.our_plotter as lo

In [11]:
reload(lo)


Out[11]:
<module 'emission.analysis.plotting.leaflet_osm.our_plotter' from '/Users/shankari/e-mission/e-mission-server/emission/analysis/plotting/leaflet_osm/our_plotter.pyc'>

In [12]:
lq.get_section('20150120T081412-0800_0')


Out[12]:
AttrDict({u'start_time': u'20150120T081412-0800', u'end_ts': 1421770947.0, u'start_ts': 1421770452.0, u'filter': u'time', u'source': u'raw_auto', u'end_time': u'20150120T082227-0800', u'_id': ObjectId('55c84b74f6858f75580c2da9'), u'id': u'20150120T081412-0800_0'})

In [13]:
import emission.core.get_database as edb

In [14]:
edb.get_section_db().find({"$or": [{'prev_section': {"$exists": True}}, {'next_section': {"$exists": True}}]}).count()


Out[14]:
1492781

In [15]:
from attrdict import AttrDict

In [16]:
bad_segment_list = [AttrDict(segment) for segment in edb.get_section_db().find({"$or": [{'prev_section': {"$exists": True}}, {'next_section': {"$exists": True}}]})]

In [17]:
import pandas as pd

In [18]:
bad_segment_df = pd.DataFrame(bad_segment_list)

In [19]:
bad_segment_df.loc[0:10]


Out[19]:
_id end_time end_ts filter id prev_section source start_time start_ts
0 55c84b74f6858f75580c2dca 20150120T091252-0800 1421773972 time 20150120T083030-0800_0 20150120T081412-0800_0 raw_auto 20150120T083030-0800 1421771430
1 55c84b74f6858f75580c2e1a 20150120T094031-0800 1421775631 time 20150120T092038-0800_0 20150120T083030-0800_0 raw_auto 20150120T092038-0800 1421774438
2 55c84b74f6858f75580c2e3a 20150120T100048-0800 1421776848 time 20150120T095103-0800_0 20150120T092038-0800_0 raw_auto 20150120T095103-0800 1421776263
3 55c84b74f6858f75580c2e4e 20150120T103531-0800 1421778931 time 20150120T100601-0800_0 20150120T095103-0800_0 raw_auto 20150120T100601-0800 1421777161
4 55c84b74f6858f75580c2e93 20150120T081848-0800 1421770728 time 20150120T081329-0800_1 20150120T081329-0800_0 raw_auto 20150120T081639-0800 1421770599
5 55c84b74f6858f75580c2e98 20150120T083212-0800 1421771532 time 20150120T082726-0800_0 20150120T081329-0800_1 raw_auto 20150120T082726-0800 1421771246
6 55c84b74f6858f75580c2ea2 20150120T084537-0800 1421772337 time 20150120T084203-0800_0 20150120T082726-0800_0 raw_auto 20150120T084203-0800 1421772123
7 55c84b74f6858f75580c2eac 20150120T085656-0800 1421773016 time 20150120T085309-0800_0 20150120T084203-0800_0 raw_auto 20150120T085309-0800 1421772789
8 55c84b74f6858f75580c2eb6 20150120T091757-0800 1421774277 time 20150120T091130-0800_0 20150120T085309-0800_0 raw_auto 20150120T091130-0800 1421773890
9 55c84b74f6858f75580c2ed0 20150120T170533-0800 1421802333 time 20150120T165421-0800_0 20150120T164520-0800_0 raw_auto 20150120T165421-0800 1421801661
10 55c84b74f6858f75580c2f1c 20150120T180834-0800 1421806114 time 20150120T173939-0800_1 20150120T173939-0800_0 raw_auto 20150120T180711-0800 1421806031

In [20]:
bad_segment_sample_df = bad_segment_df[0:10]

In [21]:
bad_segment_sample_list = bad_segment_list[0:10]

In [22]:
first_df = ls.get_section_points(bad_segment_sample_list[0])


final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1421771430.0}}, {'data.mTime': {'$lt': 1421773972.0}}], 'user_id': u'20150120T083030-0800_0', 'metadata.filter': u'time'} 

In [23]:
first_df[["mLatitude", "mLongitude", "mTime", "mAccuracy", "formatted_time"]][-15:]


Out[23]:
mLatitude mLongitude mTime mAccuracy formatted_time
63 37.586684 -122.354643 1421773576 1112.0 1970-01-17 02:56:13.576000
64 37.586684 -122.354643 1421773609 1112.0 1970-01-17 02:56:13.609000
65 37.610647 -122.388460 1421773640 1230.0 1970-01-17 02:56:13.640000
66 37.610647 -122.388460 1421773667 1230.0 1970-01-17 02:56:13.667000
67 37.538720 -122.298578 1421773700 37.5 1970-01-17 02:56:13.700000
68 37.610647 -122.388460 1421773731 1230.0 1970-01-17 02:56:13.731000
69 37.601110 -122.388062 1421773747 84.0 1970-01-17 02:56:13.747000
70 37.601129 -122.387963 1421773753 22.0 1970-01-17 02:56:13.753000
71 37.601124 -122.387921 1421773758 18.0 1970-01-17 02:56:13.758000
72 37.601124 -122.387921 1421773791 18.0 1970-01-17 02:56:13.791000
73 37.601124 -122.387921 1421773823 18.0 1970-01-17 02:56:13.823000
74 37.601124 -122.387921 1421773848 18.0 1970-01-17 02:56:13.848000
75 37.601124 -122.387921 1421773880 18.0 1970-01-17 02:56:13.880000
76 37.601124 -122.387921 1421773912 18.0 1970-01-17 02:56:13.912000
77 37.601124 -122.387921 1421773942 18.0 1970-01-17 02:56:13.942000

In [24]:
first_df.mTime.diff().plot(kind="bar", figsize=(20,6))


Out[24]:
<matplotlib.axes.AxesSubplot at 0x1ff6f5a50>

In [25]:
second_df = ls.get_section_points(bad_segment_sample_list[1])


final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1421774438.0}}, {'data.mTime': {'$lt': 1421775631.0}}], 'user_id': u'20150120T092038-0800_0', 'metadata.filter': u'time'} 

In [26]:
second_df[["mLatitude", "mLongitude", "mTime", "mAccuracy", "formatted_time"]][-15:]


Out[26]:
mLatitude mLongitude mTime mAccuracy formatted_time
15 37.707911 -122.466602 1421775135 55.5 1970-01-17 02:56:15.135000
16 37.710513 -122.459474 1421775169 64.5 1970-01-17 02:56:15.169000
17 37.711320 -122.454326 1421775202 45.0 1970-01-17 02:56:15.202000
18 37.714847 -122.450330 1421775232 69.0 1970-01-17 02:56:15.232000
19 37.703756 -122.475155 1421775262 1275.0 1970-01-17 02:56:15.262000
20 37.703756 -122.475155 1421775293 1275.0 1970-01-17 02:56:15.293000
21 37.727678 -122.442598 1421775368 39.0 1970-01-17 02:56:15.368000
22 37.727678 -122.442598 1421775399 39.0 1970-01-17 02:56:15.399000
23 37.727678 -122.442598 1421775411 39.0 1970-01-17 02:56:15.411000
24 37.727678 -122.442598 1421775439 39.0 1970-01-17 02:56:15.439000
25 37.727678 -122.442598 1421775475 39.0 1970-01-17 02:56:15.475000
26 37.727678 -122.442598 1421775503 39.0 1970-01-17 02:56:15.503000
27 37.727678 -122.442598 1421775537 39.0 1970-01-17 02:56:15.537000
28 37.727678 -122.442598 1421775567 39.0 1970-01-17 02:56:15.567000
29 37.727678 -122.442598 1421775594 39.0 1970-01-17 02:56:15.594000

In [27]:
second_df.mTime.diff().plot(kind="bar", figsize=(20,6))


Out[27]:
<matplotlib.axes.AxesSubplot at 0x1ffd05ad0>

In [28]:
second_df.loc[29].mTime - second_df.loc[20].mTime


Out[28]:
301.0

In [29]:
import emission.analysis.plotting.leaflet_osm.ipython_helper as ipy

In [30]:
second_df.loc[21]


Out[30]:
filter                                  time
formatted_time    1970-01-17 02:56:15.368000
idx                                       22
key                      background/location
mAccuracy                                 39
mLatitude                           37.72768
mLongitude                         -122.4426
mTime                           1.421775e+09
Name: 21, dtype: object

In [31]:
ipy.inline_map(lo.get_map(first_df))


Out[31]:

In [32]:
ipy.inline_map(lo.get_map(second_df))


Out[32]:

In the previous data collection, it looks like the last entries before a trip end detection all had high accuracies. This means that simply filtering by accuracy is not good enough. Let us take a look at the newer data to see if we still see that behavior.


In [33]:
import emission.core.get_database as edb
from uuid import UUID
import attrdict as ad
import datetime as pydt
import emission.analysis.point_features as pf

In [34]:
myUUID = UUID('0763de67-f61e-3f5d-90e7-518e69793954')

In [35]:
my_time_transitions = list(edb.get_usercache_db().find({"user_id": myUUID, "metadata.key": "statemachine/transition", "metadata.filter": "time"}))

In [36]:
stopped_moving_transitions = [transition for transition in my_time_transitions if transition["data"]["transition"] == "local.transition.stopped_moving"]

In [37]:
[str(pydt.datetime.fromtimestamp(t["metadata"]["write_ts"]/1000)) for t in stopped_moving_transitions[0:10]]


Out[37]:
['2015-07-21 08:28:27',
 '2015-07-21 08:35:20',
 '2015-07-21 08:45:01',
 '2015-07-21 08:52:19',
 '2015-07-21 08:56:30',
 '2015-07-21 08:58:33',
 '2015-07-21 09:01:31',
 '2015-07-21 09:10:01',
 '2015-07-21 09:15:43',
 '2015-07-21 09:17:41']

In [38]:
stopped_moving_points_list = [lq.get_points_for_section(ad.AttrDict({'user_id': myUUID, "loc_filter": "time",
                                                                'start_ts': transition["metadata"]["write_ts"] - 10 * 60 * 1000,
                                                                'end_ts': transition["metadata"]["write_ts"] + 10})).iloc[-1]
                         for transition in stopped_moving_transitions[0:10]]


final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437491907701L}}, {'data.mTime': {'$lt': 1437492507711L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437492320065L}}, {'data.mTime': {'$lt': 1437492920075L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437492901463L}}, {'data.mTime': {'$lt': 1437493501473L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437493339735L}}, {'data.mTime': {'$lt': 1437493939745L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437493590319L}}, {'data.mTime': {'$lt': 1437494190329L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437493713037L}}, {'data.mTime': {'$lt': 1437494313047L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437493891119L}}, {'data.mTime': {'$lt': 1437494491129L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437494401287L}}, {'data.mTime': {'$lt': 1437495001297L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437494743486L}}, {'data.mTime': {'$lt': 1437495343496L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437494861905L}}, {'data.mTime': {'$lt': 1437495461915L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 

In [39]:
stopped_moving_points_list_df = pd.DataFrame(stopped_moving_points_list)

In [40]:
stopped_moving_points_list_df[["mLatitude", "mLongitude", "formatted_time", "mAccuracy"]]


Out[40]:
mLatitude mLongitude formatted_time mAccuracy
43 37.394757 -122.077463 2015-07-21 08:28:26 40.500
23 37.395036 -122.077956 2015-07-21 08:35:18 30.000
16 37.391081 -122.086141 2015-07-21 08:45:00 48.000
54 37.403182 -122.097143 2015-07-21 08:52:18 10.738
67 37.413379 -122.116111 2015-07-21 08:56:27 12.258
63 37.414138 -122.117400 2015-07-21 08:58:29 12.106
47 37.417313 -122.122355 2015-07-21 09:01:30 13.964
83 37.442417 -122.154982 2015-07-21 09:09:58 12.073
78 37.445197 -122.148136 2015-07-21 09:15:40 11.086
70 37.444372 -122.146611 2015-07-21 09:17:40 13.790

In [41]:
ipy.inline_map(lo.get_map(stopped_moving_points_list_df))


Out[41]:

In [42]:
transition = stopped_moving_transitions[0]

In [43]:
stoppedMovingTs = transition["metadata"]["write_ts"]

In [44]:
currSection = ad.AttrDict({'user_id': myUUID, 'loc_filter': 'time',
                               'start_ts': stoppedMovingTs - 10 * 60 * 1000, 'end_ts': stoppedMovingTs + 5})

In [45]:
last10PointsDf = ls.add_speed(lq.get_points_for_section(currSection))


final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437491907701L}}, {'data.mTime': {'$lt': 1437492507706L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 

In [46]:
lastPoint = ad.AttrDict(last10PointsDf.iloc[-1])

In [47]:
lastPoint


Out[47]:
AttrDict({u'mProvider': u'fused', 'speed': 0.21557409250378176, 'formatted_time': Timestamp('2015-07-21 08:28:26'), u'mHasAccuracy': True, u'mHasAltitude': False, u'write_ts': 1437492507033, u'mLat1': 0, u'mDistance': 0, u'mLat2': 0, u'platform': u'android', u'mAccuracy': 40.5, u'mLon1': 0, u'mLon2': 0, u'type': u'message', u'mLatitude': 37.394757300000002, u'mAltitude': 0.0, u'mSpeed': 0.0, u'key': u'background/location', u'mInitialBearing': 0, u'mHasSpeed': False, 'distance': 6.4661449046509345, u'read_ts': 0, u'mElapsedRealtimeNanos': 144648043000000, u'mResults': [0, 0], u'mBearing': 0, u'mLongitude': -122.0774627, u'mIsFromMockProvider': False, u'filter': u'time', u'mTime': 1437492506633, u'mHasBearing': False})

In [48]:
distancesFromLast = [pf.calDistance(ad.AttrDict(pt), lastPoint) for pt in last10PointsDf.to_dict('records')[-11:]]

In [49]:
distancesFromLast


Out[49]:
[118.46643736772708,
 86.78139661866058,
 61.57483793973414,
 47.002301974722506,
 35.52651026125802,
 33.546822900922436,
 52.500909268601816,
 47.27787316933484,
 15.657271623906786,
 6.4661449046509345,
 0.0]

In [50]:
for transition in stopped_moving_transitions[0:10]:
    stoppedMovingTs = transition["metadata"]["write_ts"]
    currSection = ad.AttrDict({'user_id': myUUID, 'loc_filter': 'time',
                               'start_ts': stoppedMovingTs - 10 * 60 * 1000, 'end_ts': stoppedMovingTs + 5})
    last10Points = ls.add_speed(lq.get_points_for_section(currSection))
    lastPoint = ad.AttrDict(last10Points.iloc[-1])
    print "-" * 30 + str(pydt.datetime.fromtimestamp(stoppedMovingTs/1000)) + "\n"
    print "Last 11 distances are %s" % [pf.calDistance(ad.AttrDict(pt), lastPoint) for pt in last10Points.to_dict('records')[-11:]] + "\n"
    print "Distance from 5 mins ago = %s" % pf.calDistance(last10Points[last10Points.mTime < stoppedMovingTs - 5 * 60 * 1000].iloc[-1], lastPoint)
    print last10Points[["mLatitude", "mLongitude", "mAccuracy", "formatted_time", "distance"]]


final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437491907701L}}, {'data.mTime': {'$lt': 1437492507706L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-21 08:28:27

Last 11 distances are [118.46643736772708, 86.78139661866058, 61.57483793973414, 47.002301974722506, 35.52651026125802, 33.546822900922436, 52.500909268601816, 47.27787316933484, 15.657271623906786, 6.4661449046509345, 0.0]

Distance from 5 mins ago = 514.908936355
    mLatitude  mLongitude  mAccuracy      formatted_time   distance
0   37.391637 -122.085416     15.000 2015-07-21 08:22:15   0.000000
1   37.391944 -122.085141     15.000 2015-07-21 08:22:25  41.913573
2   37.392080 -122.085044     15.000 2015-07-21 08:22:27  17.445164
3   37.392379 -122.084888     15.000 2015-07-21 08:22:33  35.966575
4   37.392628 -122.084801     15.000 2015-07-21 08:22:38  28.688068
5   37.392781 -122.084596     15.000 2015-07-21 08:22:43  24.881376
6   37.392698 -122.084350     15.000 2015-07-21 08:22:48  23.624045
7   37.392508 -122.084097     15.000 2015-07-21 08:22:53  30.699955
8   37.392317 -122.083814     15.000 2015-07-21 08:22:58  32.828451
9   37.392214 -122.083517     15.000 2015-07-21 08:23:03  28.632559
10  37.392053 -122.083215     15.000 2015-07-21 08:23:09  32.124599
11  37.392035 -122.082954     15.000 2015-07-21 08:23:14  23.139814
12  37.392309 -122.082764     10.000 2015-07-21 08:23:19  34.684794
13  37.392530 -122.082573     15.000 2015-07-21 08:23:24  29.874505
14  37.392853 -122.082345     15.000 2015-07-21 08:23:30  41.175248
15  37.393199 -122.082317     15.000 2015-07-21 08:23:35  38.542353
16  37.393402 -122.081961     10.000 2015-07-21 08:23:41  38.727840
17  37.393709 -122.081719     10.000 2015-07-21 08:23:47  40.278835
18  37.394011 -122.081487     10.000 2015-07-21 08:23:53  39.327461
19  37.394229 -122.081305     10.000 2015-07-21 08:23:58  29.050921
20  37.394491 -122.081168     10.000 2015-07-21 08:24:04  31.567374
21  37.394489 -122.081051     10.000 2015-07-21 08:24:10  10.302770
22  37.394402 -122.080940     10.000 2015-07-21 08:24:15  13.762082
23  37.394287 -122.080650     10.000 2015-07-21 08:24:20  28.611265
24  37.394197 -122.080291     10.000 2015-07-21 08:24:26  33.276270
25  37.394119 -122.080159     10.000 2015-07-21 08:24:31  14.532052
26  37.394062 -122.079971     10.000 2015-07-21 08:24:36  17.760056
27  37.393995 -122.079704     10.000 2015-07-21 08:24:42  24.788446
28  37.393919 -122.079472     10.000 2015-07-21 08:24:47  22.124170
29  37.393826 -122.079276     10.000 2015-07-21 08:24:52  20.170013
30  37.393762 -122.079129     10.000 2015-07-21 08:24:57  14.831632
31  37.393866 -122.078916     10.000 2015-07-21 08:25:02  22.103847
32  37.394059 -122.078771     10.000 2015-07-21 08:25:08  24.988856
33  37.394227 -122.078626     10.000 2015-07-21 08:25:13  22.647393
34  37.394495 -122.078388     10.000 2015-07-21 08:25:18  36.448612
35  37.394648 -122.078146     10.000 2015-07-21 08:25:23  27.314878
36  37.394641 -122.077974     10.000 2015-07-21 08:25:28  15.176568
37  37.394504 -122.077708     10.000 2015-07-21 08:25:34  28.079339
38  37.394514 -122.077687     10.000 2015-07-21 08:25:39   2.143926
39  37.394944 -122.078008     40.500 2015-07-21 08:26:26  55.660895
40  37.395006 -122.077896     67.686 2015-07-21 08:26:56  12.051899
41  37.394619 -122.077428     45.000 2015-07-21 08:27:26  59.707309
42  37.394746 -122.077391     46.500 2015-07-21 08:27:56  14.477433
43  37.394757 -122.077463     40.500 2015-07-21 08:28:26   6.466145
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437492320065L}}, {'data.mTime': {'$lt': 1437492920070L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-21 08:35:20

Last 11 distances are [170.99201086634073, 79.36152244428513, 67.54912470327017, 46.40425016453687, 42.93264888766249, 42.11068883044887, 13.377596300142368, 8.606984279818892, 48.92031184980622, 48.92031184980622, 0.0]

Distance from 5 mins ago = 145.768549912
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.394648 -122.078146     10.000 2015-07-21 08:25:23    0.000000
1   37.394641 -122.077974     10.000 2015-07-21 08:25:28   15.176568
2   37.394504 -122.077708     10.000 2015-07-21 08:25:34   28.079339
3   37.394514 -122.077687     10.000 2015-07-21 08:25:39    2.143926
4   37.394944 -122.078008     40.500 2015-07-21 08:26:26   55.660895
5   37.395006 -122.077896     67.686 2015-07-21 08:26:56   12.051899
6   37.394619 -122.077428     45.000 2015-07-21 08:27:26   59.707309
7   37.394746 -122.077391     46.500 2015-07-21 08:27:56   14.477433
8   37.394757 -122.077463     40.500 2015-07-21 08:28:26    6.466145
9   37.394124 -122.076147     30.000 2015-07-21 08:28:56  135.868421
10  37.395221 -122.076287    109.025 2015-07-21 08:29:47  122.515937
11  37.395001 -122.076307    126.578 2015-07-21 08:30:03   24.426152
12  37.394222 -122.076230    185.070 2015-07-21 08:30:35   86.942953
13  37.394225 -122.076312    186.766 2015-07-21 08:31:18    7.243391
14  37.394690 -122.077170    183.457 2015-07-21 08:31:48   91.811580
15  37.394768 -122.077270     64.500 2015-07-21 08:32:07   12.327088
16  37.394813 -122.077512     36.000 2015-07-21 08:32:39   21.938952
17  37.394897 -122.077503      5.000 2015-07-21 08:32:52    9.341670
18  37.394748 -122.077647     10.000 2015-07-21 08:32:57   20.954049
19  37.394916 -122.077940     60.900 2015-07-21 08:33:18   31.945104
20  37.394960 -122.077940     53.334 2015-07-21 08:33:48    4.814740
21  37.394767 -122.077518     43.500 2015-07-21 08:34:18   42.979490
22  37.394767 -122.077518     86.696 2015-07-21 08:34:47    0.000000
23  37.395036 -122.077956     30.000 2015-07-21 08:35:18   48.920312
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437492901463L}}, {'data.mTime': {'$lt': 1437493501468L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-21 08:45:01

Last 11 distances are [85.24503451385837, 21.55921092373731, 16.952890590570252, 19.574547821543167, 18.570289122795153, 19.3832409769756, 16.48854872186352, 17.77571316557204, 17.53218933884683, 20.267462474063795, 0.0]

Distance from 5 mins ago = 85.2450345139
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.395036 -122.077956     30.000 2015-07-21 08:35:18    0.000000
1   37.392987 -122.080762    135.805 2015-07-21 08:36:52  336.717693
2   37.391681 -122.082419     54.000 2015-07-21 08:37:51  206.135850
3   37.391090 -122.083023     84.000 2015-07-21 08:38:21   84.631618
4   37.391635 -122.084783     42.887 2015-07-21 08:38:51  166.892541
5   37.391672 -122.085718     43.500 2015-07-21 08:39:21   82.662252
6   37.391751 -122.085671     37.500 2015-07-21 08:39:52    9.737810
7   37.390925 -122.086285     37.500 2015-07-21 08:40:22  106.669574
8   37.390951 -122.086240     51.000 2015-07-21 08:40:59    4.932783
9   37.390947 -122.086284     37.500 2015-07-21 08:41:29    3.911319
10  37.390958 -122.086282     34.500 2015-07-21 08:42:00    1.239596
11  37.390945 -122.086277     30.000 2015-07-21 08:42:30    1.527378
12  37.390955 -122.086239     30.000 2015-07-21 08:43:00    3.562708
13  37.390948 -122.086251     31.500 2015-07-21 08:43:30    1.362675
14  37.390951 -122.086252     30.000 2015-07-21 08:44:00    0.339269
15  37.390925 -122.086258     30.000 2015-07-21 08:44:30    2.927484
16  37.391081 -122.086141     48.000 2015-07-21 08:45:00   20.267462
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437493339735L}}, {'data.mTime': {'$lt': 1437493939740L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-21 08:52:19

Last 11 distances are [118.41669127828519, 60.24328863136597, 38.94974992037953, 35.81309233327287, 35.81309233327287, 17.276095952095375, 8.49747960967481, 5.918207304349262, 2.2083900961105285, 0.8303125739314485, 0.0]

Distance from 5 mins ago = 1681.65296319
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.390945 -122.086277     30.000 2015-07-21 08:42:30    0.000000
1   37.390955 -122.086239     30.000 2015-07-21 08:43:00    3.562708
2   37.390948 -122.086251     31.500 2015-07-21 08:43:30    1.362675
3   37.390951 -122.086252     30.000 2015-07-21 08:44:00    0.339269
4   37.390925 -122.086258     30.000 2015-07-21 08:44:30    2.927484
5   37.391081 -122.086141     48.000 2015-07-21 08:45:00   20.267462
6   37.388832 -122.087709     40.500 2015-07-21 08:46:30  285.957645
7   37.388818 -122.087715     28.637 2015-07-21 08:46:35    1.586181
8   37.388775 -122.087757     37.500 2015-07-21 08:46:53    6.075287
9   37.388775 -122.087757     37.500 2015-07-21 08:46:59    0.000000
10  37.388775 -122.087757     37.500 2015-07-21 08:47:04    0.000000
11  37.390528 -122.086590     25.020 2015-07-21 08:47:09  220.466810
12  37.390665 -122.086459     20.545 2015-07-21 08:47:14   19.166920
13  37.392346 -122.085273     88.500 2015-07-21 08:47:33  214.323025
14  37.392692 -122.085089     42.000 2015-07-21 08:47:46   41.752798
15  37.392835 -122.085037     19.779 2015-07-21 08:48:01   16.521587
16  37.392862 -122.085026     18.107 2015-07-21 08:48:06    3.129440
17  37.392895 -122.085021     16.628 2015-07-21 08:48:11    3.701021
18  37.392895 -122.085021     16.628 2015-07-21 08:48:16    0.000000
19  37.394786 -122.083708     29.165 2015-07-21 08:48:27  240.194689
20  37.395014 -122.083581     19.546 2015-07-21 08:48:37   27.675610
21  37.395197 -122.083460     15.488 2015-07-21 08:48:47   23.024768
22  37.395295 -122.083397     14.466 2015-07-21 08:48:52   12.285879
23  37.395295 -122.083397     14.466 2015-07-21 08:48:57    0.000000
24  37.395295 -122.083397     14.466 2015-07-21 08:49:02    0.000000
25  37.397885 -122.081145     86.380 2015-07-21 08:49:17  349.951404
26  37.397894 -122.081146     61.646 2015-07-21 08:49:22    1.097737
27  37.397838 -122.081181     49.100 2015-07-21 08:49:32    6.974019
28  37.397779 -122.083238     40.500 2015-07-21 08:49:52  181.751513
29  37.398079 -122.083660     10.000 2015-07-21 08:49:57   50.064136
30  37.398480 -122.084737     10.000 2015-07-21 08:50:03  105.080356
31  37.398809 -122.085724     10.000 2015-07-21 08:50:08   94.514258
32  37.399235 -122.086995     10.000 2015-07-21 08:50:14  121.847173
33  37.399736 -122.088238     10.000 2015-07-21 08:50:20  123.133342
34  37.400126 -122.089194     10.000 2015-07-21 08:50:25   94.961291
35  37.400542 -122.090239     10.000 2015-07-21 08:50:31  103.275092
36  37.400831 -122.090947      5.000 2015-07-21 08:50:36   70.275229
37  37.400978 -122.091312      5.000 2015-07-21 08:50:41   36.122725
38  37.401130 -122.091704      5.000 2015-07-21 08:50:47   38.551752
39  37.401308 -122.092181      5.000 2015-07-21 08:50:52   46.597368
40  37.401593 -122.092886      5.000 2015-07-21 08:50:58   69.811572
41  37.401884 -122.093526      5.000 2015-07-21 08:51:03   65.198768
42  37.402237 -122.094350      5.000 2015-07-21 08:51:09   82.645240
43  37.402542 -122.095099      5.000 2015-07-21 08:51:14   74.348975
44  37.402834 -122.095876     10.000 2015-07-21 08:51:19   75.894477
45  37.403032 -122.096487      5.000 2015-07-21 08:51:24   58.346163
46  37.403101 -122.096714      5.000 2015-07-21 08:51:29   21.411848
47  37.403113 -122.096746      5.000 2015-07-21 08:51:38    3.201207
48  37.403113 -122.096746      5.000 2015-07-21 08:51:43    0.000000
49  37.403116 -122.096965     14.921 2015-07-21 08:51:48   19.347410
50  37.403159 -122.097051     13.063 2015-07-21 08:51:58    8.923707
51  37.403171 -122.097077     12.387 2015-07-21 08:52:03    2.665855
52  37.403182 -122.097117     11.449 2015-07-21 08:52:08    3.795357
53  37.403182 -122.097133     11.017 2015-07-21 08:52:13    1.378145
54  37.403182 -122.097143     10.738 2015-07-21 08:52:18    0.830313
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437493590319L}}, {'data.mTime': {'$lt': 1437494190324L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-21 08:56:30

Last 11 distances are [533.2228900180139, 85.20416929773276, 70.33443274753587, 39.64820342972417, 28.39836361426149, 17.13868106250517, 9.285035189334716, 4.309153957605097, 2.4696416114315047, 0.8998839864627165, 0.0]

Distance from 5 mins ago = 2059.54582835
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.388832 -122.087709     40.500 2015-07-21 08:46:30    0.000000
1   37.388818 -122.087715     28.637 2015-07-21 08:46:35    1.586181
2   37.388775 -122.087757     37.500 2015-07-21 08:46:53    6.075287
3   37.388775 -122.087757     37.500 2015-07-21 08:46:59    0.000000
4   37.388775 -122.087757     37.500 2015-07-21 08:47:04    0.000000
5   37.390528 -122.086590     25.020 2015-07-21 08:47:09  220.466810
6   37.390665 -122.086459     20.545 2015-07-21 08:47:14   19.166920
7   37.392346 -122.085273     88.500 2015-07-21 08:47:33  214.323025
8   37.392692 -122.085089     42.000 2015-07-21 08:47:46   41.752798
9   37.392835 -122.085037     19.779 2015-07-21 08:48:01   16.521587
10  37.392862 -122.085026     18.107 2015-07-21 08:48:06    3.129440
11  37.392895 -122.085021     16.628 2015-07-21 08:48:11    3.701021
12  37.392895 -122.085021     16.628 2015-07-21 08:48:16    0.000000
13  37.394786 -122.083708     29.165 2015-07-21 08:48:27  240.194689
14  37.395014 -122.083581     19.546 2015-07-21 08:48:37   27.675610
15  37.395197 -122.083460     15.488 2015-07-21 08:48:47   23.024768
16  37.395295 -122.083397     14.466 2015-07-21 08:48:52   12.285879
17  37.395295 -122.083397     14.466 2015-07-21 08:48:57    0.000000
18  37.395295 -122.083397     14.466 2015-07-21 08:49:02    0.000000
19  37.397885 -122.081145     86.380 2015-07-21 08:49:17  349.951404
20  37.397894 -122.081146     61.646 2015-07-21 08:49:22    1.097737
21  37.397838 -122.081181     49.100 2015-07-21 08:49:32    6.974019
22  37.397779 -122.083238     40.500 2015-07-21 08:49:52  181.751513
23  37.398079 -122.083660     10.000 2015-07-21 08:49:57   50.064136
24  37.398480 -122.084737     10.000 2015-07-21 08:50:03  105.080356
25  37.398809 -122.085724     10.000 2015-07-21 08:50:08   94.514258
26  37.399235 -122.086995     10.000 2015-07-21 08:50:14  121.847173
27  37.399736 -122.088238     10.000 2015-07-21 08:50:20  123.133342
28  37.400126 -122.089194     10.000 2015-07-21 08:50:25   94.961291
29  37.400542 -122.090239     10.000 2015-07-21 08:50:31  103.275092
..        ...         ...        ...                 ...         ...
38  37.402834 -122.095876     10.000 2015-07-21 08:51:19   75.894477
39  37.403032 -122.096487      5.000 2015-07-21 08:51:24   58.346163
40  37.403101 -122.096714      5.000 2015-07-21 08:51:29   21.411848
41  37.403113 -122.096746      5.000 2015-07-21 08:51:38    3.201207
42  37.403113 -122.096746      5.000 2015-07-21 08:51:43    0.000000
43  37.403116 -122.096965     14.921 2015-07-21 08:51:48   19.347410
44  37.403159 -122.097051     13.063 2015-07-21 08:51:58    8.923707
45  37.403171 -122.097077     12.387 2015-07-21 08:52:03    2.665855
46  37.403182 -122.097117     11.449 2015-07-21 08:52:08    3.795357
47  37.403182 -122.097133     11.017 2015-07-21 08:52:13    1.378145
48  37.403182 -122.097143     10.738 2015-07-21 08:52:18    0.830313
49  37.407247 -122.105627     36.000 2015-07-21 08:54:36  875.196407
50  37.407277 -122.105687     31.068 2015-07-21 08:54:41    6.285868
51  37.407277 -122.105687     31.068 2015-07-21 08:54:47    0.000000
52  37.407277 -122.105687     31.068 2015-07-21 08:54:52    0.000000
53  37.407277 -122.105687     31.068 2015-07-21 08:55:01    0.000000
54  37.410207 -122.111151     52.500 2015-07-21 08:55:07  582.240231
55  37.410341 -122.111289     29.690 2015-07-21 08:55:12   19.284749
56  37.410413 -122.111368     25.250 2015-07-21 08:55:17   10.596706
57  37.410413 -122.111368     25.250 2015-07-21 08:55:22    0.000000
58  37.412883 -122.115377     42.000 2015-07-21 08:55:32  448.093206
59  37.412985 -122.115489     30.214 2015-07-21 08:55:37   15.069442
60  37.413167 -122.115751     21.621 2015-07-21 08:55:47   30.740202
61  37.413227 -122.115853     19.361 2015-07-21 08:55:52   11.249913
62  37.413287 -122.115956     17.203 2015-07-21 08:55:57   11.259815
63  37.413329 -122.116027     15.636 2015-07-21 08:56:02    7.853670
64  37.413356 -122.116073     14.342 2015-07-21 08:56:07    4.976539
65  37.413366 -122.116089     13.572 2015-07-21 08:56:12    1.839658
66  37.413374 -122.116104     12.994 2015-07-21 08:56:17    1.572872
67  37.413379 -122.116111     12.258 2015-07-21 08:56:27    0.899884

[68 rows x 5 columns]
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437493713037L}}, {'data.mTime': {'$lt': 1437494313042L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-21 08:58:33

Last 11 distances are [141.6819323284479, 2.5129703522147606, 4.256278083062628, 3.9747375352222796, 2.6407776977875974, 4.7865742010334715, 4.163510860103995, 1.101148582534241, 0.7459191699211085, 1.5516453374482806, 0.0]

Distance from 5 mins ago = 2164.6321178
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.395014 -122.083581     19.546 2015-07-21 08:48:37    0.000000
1   37.395197 -122.083460     15.488 2015-07-21 08:48:47   23.024768
2   37.395295 -122.083397     14.466 2015-07-21 08:48:52   12.285879
3   37.395295 -122.083397     14.466 2015-07-21 08:48:57    0.000000
4   37.395295 -122.083397     14.466 2015-07-21 08:49:02    0.000000
5   37.397885 -122.081145     86.380 2015-07-21 08:49:17  349.951404
6   37.397894 -122.081146     61.646 2015-07-21 08:49:22    1.097737
7   37.397838 -122.081181     49.100 2015-07-21 08:49:32    6.974019
8   37.397779 -122.083238     40.500 2015-07-21 08:49:52  181.751513
9   37.398079 -122.083660     10.000 2015-07-21 08:49:57   50.064136
10  37.398480 -122.084737     10.000 2015-07-21 08:50:03  105.080356
11  37.398809 -122.085724     10.000 2015-07-21 08:50:08   94.514258
12  37.399235 -122.086995     10.000 2015-07-21 08:50:14  121.847173
13  37.399736 -122.088238     10.000 2015-07-21 08:50:20  123.133342
14  37.400126 -122.089194     10.000 2015-07-21 08:50:25   94.961291
15  37.400542 -122.090239     10.000 2015-07-21 08:50:31  103.275092
16  37.400831 -122.090947      5.000 2015-07-21 08:50:36   70.275229
17  37.400978 -122.091312      5.000 2015-07-21 08:50:41   36.122725
18  37.401130 -122.091704      5.000 2015-07-21 08:50:47   38.551752
19  37.401308 -122.092181      5.000 2015-07-21 08:50:52   46.597368
20  37.401593 -122.092886      5.000 2015-07-21 08:50:58   69.811572
21  37.401884 -122.093526      5.000 2015-07-21 08:51:03   65.198768
22  37.402237 -122.094350      5.000 2015-07-21 08:51:09   82.645240
23  37.402542 -122.095099      5.000 2015-07-21 08:51:14   74.348975
24  37.402834 -122.095876     10.000 2015-07-21 08:51:19   75.894477
25  37.403032 -122.096487      5.000 2015-07-21 08:51:24   58.346163
26  37.403101 -122.096714      5.000 2015-07-21 08:51:29   21.411848
27  37.403113 -122.096746      5.000 2015-07-21 08:51:38    3.201207
28  37.403113 -122.096746      5.000 2015-07-21 08:51:43    0.000000
29  37.403116 -122.096965     14.921 2015-07-21 08:51:48   19.347410
..        ...         ...        ...                 ...         ...
34  37.403182 -122.097143     10.738 2015-07-21 08:52:18    0.830313
35  37.407247 -122.105627     36.000 2015-07-21 08:54:36  875.196407
36  37.407277 -122.105687     31.068 2015-07-21 08:54:41    6.285868
37  37.407277 -122.105687     31.068 2015-07-21 08:54:47    0.000000
38  37.407277 -122.105687     31.068 2015-07-21 08:54:52    0.000000
39  37.407277 -122.105687     31.068 2015-07-21 08:55:01    0.000000
40  37.410207 -122.111151     52.500 2015-07-21 08:55:07  582.240231
41  37.410341 -122.111289     29.690 2015-07-21 08:55:12   19.284749
42  37.410413 -122.111368     25.250 2015-07-21 08:55:17   10.596706
43  37.410413 -122.111368     25.250 2015-07-21 08:55:22    0.000000
44  37.412883 -122.115377     42.000 2015-07-21 08:55:32  448.093206
45  37.412985 -122.115489     30.214 2015-07-21 08:55:37   15.069442
46  37.413167 -122.115751     21.621 2015-07-21 08:55:47   30.740202
47  37.413227 -122.115853     19.361 2015-07-21 08:55:52   11.249913
48  37.413287 -122.115956     17.203 2015-07-21 08:55:57   11.259815
49  37.413329 -122.116027     15.636 2015-07-21 08:56:02    7.853670
50  37.413356 -122.116073     14.342 2015-07-21 08:56:07    4.976539
51  37.413366 -122.116089     13.572 2015-07-21 08:56:12    1.839658
52  37.413374 -122.116104     12.994 2015-07-21 08:56:17    1.572872
53  37.413379 -122.116111     12.258 2015-07-21 08:56:27    0.899884
54  37.414129 -122.117374     42.000 2015-07-21 08:57:32  139.235112
55  37.414116 -122.117361     34.500 2015-07-21 08:57:47    1.853901
56  37.414118 -122.117363     24.395 2015-07-21 08:57:48    0.305885
57  37.414127 -122.117374     20.896 2015-07-21 08:57:53    1.366902
58  37.414110 -122.117359     18.072 2015-07-21 08:57:58    2.269677
59  37.414115 -122.117363     16.913 2015-07-21 08:58:03    0.635943
60  37.414148 -122.117401     15.308 2015-07-21 08:58:08    4.934790
61  37.414143 -122.117395     14.172 2015-07-21 08:58:13    0.788309
62  37.414132 -122.117384     13.257 2015-07-21 08:58:19    1.453924
63  37.414138 -122.117400     12.106 2015-07-21 08:58:29    1.551645

[64 rows x 5 columns]
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437493891119L}}, {'data.mTime': {'$lt': 1437494491124L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-21 09:01:31

Last 11 distances are [415.7507087819947, 1.0783541204160654, 1.0965097714125918, 1.1480695441153814, 1.173800244245548, 1.2334556086032744, 1.297405717386726, 1.0309749136419737, 0.8922521985740026, 0.4357762398940703, 0.0]

Distance from 5 mins ago = 703.793313395
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.403113 -122.096746      5.000 2015-07-21 08:51:38    0.000000
1   37.403113 -122.096746      5.000 2015-07-21 08:51:43    0.000000
2   37.403116 -122.096965     14.921 2015-07-21 08:51:48   19.347410
3   37.403159 -122.097051     13.063 2015-07-21 08:51:58    8.923707
4   37.403171 -122.097077     12.387 2015-07-21 08:52:03    2.665855
5   37.403182 -122.097117     11.449 2015-07-21 08:52:08    3.795357
6   37.403182 -122.097133     11.017 2015-07-21 08:52:13    1.378145
7   37.403182 -122.097143     10.738 2015-07-21 08:52:18    0.830313
8   37.407247 -122.105627     36.000 2015-07-21 08:54:36  875.196407
9   37.407277 -122.105687     31.068 2015-07-21 08:54:41    6.285868
10  37.407277 -122.105687     31.068 2015-07-21 08:54:47    0.000000
11  37.407277 -122.105687     31.068 2015-07-21 08:54:52    0.000000
12  37.407277 -122.105687     31.068 2015-07-21 08:55:01    0.000000
13  37.410207 -122.111151     52.500 2015-07-21 08:55:07  582.240231
14  37.410341 -122.111289     29.690 2015-07-21 08:55:12   19.284749
15  37.410413 -122.111368     25.250 2015-07-21 08:55:17   10.596706
16  37.410413 -122.111368     25.250 2015-07-21 08:55:22    0.000000
17  37.412883 -122.115377     42.000 2015-07-21 08:55:32  448.093206
18  37.412985 -122.115489     30.214 2015-07-21 08:55:37   15.069442
19  37.413167 -122.115751     21.621 2015-07-21 08:55:47   30.740202
20  37.413227 -122.115853     19.361 2015-07-21 08:55:52   11.249913
21  37.413287 -122.115956     17.203 2015-07-21 08:55:57   11.259815
22  37.413329 -122.116027     15.636 2015-07-21 08:56:02    7.853670
23  37.413356 -122.116073     14.342 2015-07-21 08:56:07    4.976539
24  37.413366 -122.116089     13.572 2015-07-21 08:56:12    1.839658
25  37.413374 -122.116104     12.994 2015-07-21 08:56:17    1.572872
26  37.413379 -122.116111     12.258 2015-07-21 08:56:27    0.899884
27  37.414129 -122.117374     42.000 2015-07-21 08:57:32  139.235112
28  37.414116 -122.117361     34.500 2015-07-21 08:57:47    1.853901
29  37.414118 -122.117363     24.395 2015-07-21 08:57:48    0.305885
30  37.414127 -122.117374     20.896 2015-07-21 08:57:53    1.366902
31  37.414110 -122.117359     18.072 2015-07-21 08:57:58    2.269677
32  37.414115 -122.117363     16.913 2015-07-21 08:58:03    0.635943
33  37.414148 -122.117401     15.308 2015-07-21 08:58:08    4.934790
34  37.414143 -122.117395     14.172 2015-07-21 08:58:13    0.788309
35  37.414132 -122.117384     13.257 2015-07-21 08:58:19    1.453924
36  37.414138 -122.117400     12.106 2015-07-21 08:58:29    1.551645
37  37.415071 -122.118587     37.500 2015-07-21 08:59:34  147.490336
38  37.417313 -122.122342     34.500 2015-07-21 09:00:34  414.915591
39  37.417312 -122.122342     24.395 2015-07-21 09:00:44    0.101622
40  37.417310 -122.122342     19.918 2015-07-21 09:00:49    0.289107
41  37.417309 -122.122342     17.250 2015-07-21 09:00:54    0.100464
42  37.417307 -122.122342     15.870 2015-07-21 09:00:59    0.155923
43  37.417306 -122.122342     14.521 2015-07-21 09:01:05    0.122314
44  37.417307 -122.122346     14.314 2015-07-21 09:01:15    0.296694
45  37.417308 -122.122347     14.213 2015-07-21 09:01:20    0.139472
46  37.417310 -122.122351     14.087 2015-07-21 09:01:25    0.456480
47  37.417313 -122.122355     13.964 2015-07-21 09:01:30    0.435776
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437494401287L}}, {'data.mTime': {'$lt': 1437495001292L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-21 09:10:01

Last 11 distances are [127.47765156786271, 11.487243254117356, 15.125375707254415, 17.181145233626392, 11.455519981266605, 9.532192097019712, 7.82318732665946, 2.9494296150981714, 1.9263920103322039, 1.2441354658313586, 0.0]

Distance from 5 mins ago = 1252.07826291
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.417313 -122.122342     34.500 2015-07-21 09:00:34    0.000000
1   37.417312 -122.122342     24.395 2015-07-21 09:00:44    0.101622
2   37.417310 -122.122342     19.918 2015-07-21 09:00:49    0.289107
3   37.417309 -122.122342     17.250 2015-07-21 09:00:54    0.100464
4   37.417307 -122.122342     15.870 2015-07-21 09:00:59    0.155923
5   37.417306 -122.122342     14.521 2015-07-21 09:01:05    0.122314
6   37.417307 -122.122346     14.314 2015-07-21 09:01:15    0.296694
7   37.417308 -122.122347     14.213 2015-07-21 09:01:20    0.139472
8   37.417310 -122.122351     14.087 2015-07-21 09:01:25    0.456480
9   37.417313 -122.122355     13.964 2015-07-21 09:01:30    0.435776
10  37.418926 -122.124897     55.500 2015-07-21 09:02:20  287.315532
11  37.418925 -122.124902     35.643 2015-07-21 09:02:24    0.521898
12  37.418890 -122.124847     29.489 2015-07-21 09:02:30    6.182610
13  37.419029 -122.124992     25.334 2015-07-21 09:02:35   20.040062
14  37.419198 -122.125195     21.478 2015-07-21 09:02:40   25.983665
15  37.419198 -122.125195     21.478 2015-07-21 09:02:45    0.000000
16  37.419198 -122.125195     21.478 2015-07-21 09:02:50    0.000000
17  37.421478 -122.128863     26.547 2015-07-21 09:03:00  411.354869
18  37.421592 -122.129030     21.039 2015-07-21 09:03:05   19.453027
19  37.421592 -122.129030     21.039 2015-07-21 09:03:15    0.000000
20  37.423182 -122.131075     24.908 2015-07-21 09:03:20  252.721346
21  37.423210 -122.131189     22.504 2015-07-21 09:03:30   10.514783
22  37.423210 -122.131189     22.504 2015-07-21 09:03:35    0.000000
23  37.424986 -122.134362     21.213 2015-07-21 09:03:45  342.808210
24  37.424986 -122.134362     21.213 2015-07-21 09:03:50    0.000000
25  37.426933 -122.137557     44.999 2015-07-21 09:03:55  355.680301
26  37.426933 -122.137557     44.999 2015-07-21 09:04:04    0.000000
27  37.426933 -122.137557     44.999 2015-07-21 09:04:10    0.000000
28  37.428803 -122.140188     38.999 2015-07-21 09:04:20  311.751499
29  37.428803 -122.140188     38.999 2015-07-21 09:04:25    0.000000
..        ...         ...        ...                 ...         ...
54  37.438313 -122.155351     21.164 2015-07-21 09:07:12   33.018900
55  37.438458 -122.155634     17.373 2015-07-21 09:07:22   29.678072
56  37.438530 -122.155767     15.966 2015-07-21 09:07:27   14.236081
57  37.438530 -122.155767     15.966 2015-07-21 09:07:32    0.000000
58  37.438530 -122.155767     15.966 2015-07-21 09:07:37    0.000000
59  37.439680 -122.157707     26.766 2015-07-21 09:07:42  213.762054
60  37.439739 -122.157587     23.004 2015-07-21 09:07:47   12.436294
61  37.439798 -122.157487     19.636 2015-07-21 09:07:57   11.005649
62  37.439884 -122.157402     18.252 2015-07-21 09:08:02   12.182062
63  37.439884 -122.157402     18.252 2015-07-21 09:08:07    0.000000
64  37.439884 -122.157402     18.252 2015-07-21 09:08:12    0.000000
65  37.441090 -122.156242     23.475 2015-07-21 09:08:17  168.729751
66  37.441125 -122.156195     21.430 2015-07-21 09:08:22    5.741749
67  37.441149 -122.156133     19.568 2015-07-21 09:08:27    5.989043
68  37.441176 -122.156116     18.557 2015-07-21 09:08:32    3.469715
69  37.441260 -122.156027     17.156 2015-07-21 09:08:37   12.132063
70  37.441353 -122.155940     15.797 2015-07-21 09:08:42   12.956201
71  37.441408 -122.155879     15.054 2015-07-21 09:08:47    8.084808
72  37.441476 -122.155806     14.111 2015-07-21 09:08:52    9.901138
73  37.441476 -122.155806     14.111 2015-07-21 09:08:57    0.000000
74  37.442336 -122.155062     21.849 2015-07-21 09:09:07  116.013286
75  37.442309 -122.155087     19.383 2015-07-21 09:09:12    3.639030
76  37.442292 -122.155097     17.483 2015-07-21 09:09:17    2.097660
77  37.442333 -122.155057     16.059 2015-07-21 09:09:22    5.730539
78  37.442348 -122.155046     15.318 2015-07-21 09:09:28    1.929046
79  37.442363 -122.155039     14.871 2015-07-21 09:09:33    1.816544
80  37.442396 -122.155003     13.473 2015-07-21 09:09:43    4.874456
81  37.442403 -122.154994     13.004 2015-07-21 09:09:48    1.039560
82  37.442407 -122.154989     12.554 2015-07-21 09:09:53    0.701860
83  37.442417 -122.154982     12.073 2015-07-21 09:09:58    1.244135

[84 rows x 5 columns]
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437494743486L}}, {'data.mTime': {'$lt': 1437495343491L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-21 09:15:43

Last 11 distances are [247.41072949408252, 79.61152504589376, 71.82489036646224, 65.26085643707937, 32.84990663706683, 18.520629754799074, 14.822480817460162, 12.215933166227972, 6.700225600598114, 2.9989595280042645, 0.0]

Distance from 5 mins ago = 678.869311504
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.434214 -122.149233     13.297 2015-07-21 09:05:46    0.000000
1   37.434261 -122.149315     12.019 2015-07-21 09:05:56    8.965140
2   37.434283 -122.149356     11.486 2015-07-21 09:06:01    4.307660
3   37.434307 -122.149402     10.847 2015-07-21 09:06:06    4.862462
4   37.434323 -122.149426     10.503 2015-07-21 09:06:11    2.767815
5   37.434323 -122.149426     10.503 2015-07-21 09:06:21    0.000000
6   37.435132 -122.150689     22.641 2015-07-21 09:06:26  143.275554
7   37.435262 -122.150909     18.072 2015-07-21 09:06:31   24.186018
8   37.435262 -122.150909     18.072 2015-07-21 09:06:41    0.000000
9   37.436034 -122.152384     21.316 2015-07-21 09:06:46  155.977239
10  37.436034 -122.152384     21.316 2015-07-21 09:06:56    0.000000
11  37.438055 -122.155018     32.796 2015-07-21 09:07:02  323.447358
12  37.438117 -122.155070     27.585 2015-07-21 09:07:07    8.293943
13  37.438313 -122.155351     21.164 2015-07-21 09:07:12   33.018900
14  37.438458 -122.155634     17.373 2015-07-21 09:07:22   29.678072
15  37.438530 -122.155767     15.966 2015-07-21 09:07:27   14.236081
16  37.438530 -122.155767     15.966 2015-07-21 09:07:32    0.000000
17  37.438530 -122.155767     15.966 2015-07-21 09:07:37    0.000000
18  37.439680 -122.157707     26.766 2015-07-21 09:07:42  213.762054
19  37.439739 -122.157587     23.004 2015-07-21 09:07:47   12.436294
20  37.439798 -122.157487     19.636 2015-07-21 09:07:57   11.005649
21  37.439884 -122.157402     18.252 2015-07-21 09:08:02   12.182062
22  37.439884 -122.157402     18.252 2015-07-21 09:08:07    0.000000
23  37.439884 -122.157402     18.252 2015-07-21 09:08:12    0.000000
24  37.441090 -122.156242     23.475 2015-07-21 09:08:17  168.729751
25  37.441125 -122.156195     21.430 2015-07-21 09:08:22    5.741749
26  37.441149 -122.156133     19.568 2015-07-21 09:08:27    5.989043
27  37.441176 -122.156116     18.557 2015-07-21 09:08:32    3.469715
28  37.441260 -122.156027     17.156 2015-07-21 09:08:37   12.132063
29  37.441353 -122.155940     15.797 2015-07-21 09:08:42   12.956201
..        ...         ...        ...                 ...         ...
49  37.444540 -122.153139     16.109 2015-07-21 09:12:29    0.000000
50  37.445468 -122.153935     34.653 2015-07-21 09:12:39  124.786358
51  37.445480 -122.153926     21.893 2015-07-21 09:12:44    1.533506
52  37.445518 -122.153900     21.048 2015-07-21 09:12:49    4.832999
53  37.445518 -122.153900     21.048 2015-07-21 09:12:54    0.000000
54  37.445518 -122.153900     21.048 2015-07-21 09:12:59    0.000000
55  37.446616 -122.153135     25.115 2015-07-21 09:13:09  139.485950
56  37.446500 -122.152965     22.366 2015-07-21 09:13:14   19.815200
57  37.446500 -122.152965     22.366 2015-07-21 09:13:24    0.000000
58  37.445687 -122.152079     20.356 2015-07-21 09:13:34  119.496150
59  37.445698 -122.151987     18.188 2015-07-21 09:13:39    8.222167
60  37.445721 -122.151923     16.592 2015-07-21 09:13:49    6.206450
61  37.445721 -122.151923     16.592 2015-07-21 09:13:54    0.000000
62  37.446643 -122.150474     20.445 2015-07-21 09:13:59  163.932299
63  37.446650 -122.150456     17.149 2015-07-21 09:14:04    1.785305
64  37.446650 -122.150443     15.792 2015-07-21 09:14:09    1.156947
65  37.446643 -122.150418     13.027 2015-07-21 09:14:19    2.335643
66  37.446635 -122.150407     12.401 2015-07-21 09:14:24    1.325633
67  37.446579 -122.150333     11.774 2015-07-21 09:14:29    9.039363
68  37.446579 -122.150333     11.774 2015-07-21 09:14:39    0.000000
69  37.445610 -122.148873     23.281 2015-07-21 09:14:45  167.980866
70  37.445558 -122.148810     22.076 2015-07-21 09:14:50    7.946035
71  37.445517 -122.148756     21.074 2015-07-21 09:14:55    6.675638
72  37.445358 -122.148448     16.436 2015-07-21 09:15:05   32.411007
73  37.445289 -122.148311     14.304 2015-07-21 09:15:15   14.332115
74  37.445273 -122.148274     13.487 2015-07-21 09:15:20    3.710192
75  37.445260 -122.148250     13.039 2015-07-21 09:15:25    2.606601
76  37.445231 -122.148198     12.259 2015-07-21 09:15:30    5.515709
77  37.445213 -122.148164     11.652 2015-07-21 09:15:35    3.701387
78  37.445197 -122.148136     11.086 2015-07-21 09:15:40    2.998960

[79 rows x 5 columns]
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437494861905L}}, {'data.mTime': {'$lt': 1437495461910L}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-21 09:17:41

Last 11 distances are [162.90914512822314, 53.48121080595078, 47.79391653039904, 40.0339724047162, 29.55428854890513, 24.875172843747695, 18.703037475444095, 16.129897511972036, 8.46125493775654, 6.553110944378964, 0.0]

Distance from 5 mins ago = 657.907549843
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.439680 -122.157707     26.766 2015-07-21 09:07:42    0.000000
1   37.439739 -122.157587     23.004 2015-07-21 09:07:47   12.436294
2   37.439798 -122.157487     19.636 2015-07-21 09:07:57   11.005649
3   37.439884 -122.157402     18.252 2015-07-21 09:08:02   12.182062
4   37.439884 -122.157402     18.252 2015-07-21 09:08:07    0.000000
5   37.439884 -122.157402     18.252 2015-07-21 09:08:12    0.000000
6   37.441090 -122.156242     23.475 2015-07-21 09:08:17  168.729751
7   37.441125 -122.156195     21.430 2015-07-21 09:08:22    5.741749
8   37.441149 -122.156133     19.568 2015-07-21 09:08:27    5.989043
9   37.441176 -122.156116     18.557 2015-07-21 09:08:32    3.469715
10  37.441260 -122.156027     17.156 2015-07-21 09:08:37   12.132063
11  37.441353 -122.155940     15.797 2015-07-21 09:08:42   12.956201
12  37.441408 -122.155879     15.054 2015-07-21 09:08:47    8.084808
13  37.441476 -122.155806     14.111 2015-07-21 09:08:52    9.901138
14  37.441476 -122.155806     14.111 2015-07-21 09:08:57    0.000000
15  37.442336 -122.155062     21.849 2015-07-21 09:09:07  116.013286
16  37.442309 -122.155087     19.383 2015-07-21 09:09:12    3.639030
17  37.442292 -122.155097     17.483 2015-07-21 09:09:17    2.097660
18  37.442333 -122.155057     16.059 2015-07-21 09:09:22    5.730539
19  37.442348 -122.155046     15.318 2015-07-21 09:09:28    1.929046
20  37.442363 -122.155039     14.871 2015-07-21 09:09:33    1.816544
21  37.442396 -122.155003     13.473 2015-07-21 09:09:43    4.874456
22  37.442403 -122.154994     13.004 2015-07-21 09:09:48    1.039560
23  37.442407 -122.154989     12.554 2015-07-21 09:09:53    0.701860
24  37.442417 -122.154982     12.073 2015-07-21 09:09:58    1.244135
25  37.444560 -122.153007     37.500 2015-07-21 09:11:02  295.281953
26  37.444560 -122.153007    820.490 2015-07-21 09:12:03    0.000000
27  37.444435 -122.153018     24.148 2015-07-21 09:12:09   13.903773
28  37.444468 -122.153010     18.122 2015-07-21 09:12:14    3.669601
29  37.444501 -122.153082     16.810 2015-07-21 09:12:19    7.308901
..        ...         ...        ...                 ...         ...
41  37.445698 -122.151987     18.188 2015-07-21 09:13:39    8.222167
42  37.445721 -122.151923     16.592 2015-07-21 09:13:49    6.206450
43  37.445721 -122.151923     16.592 2015-07-21 09:13:54    0.000000
44  37.446643 -122.150474     20.445 2015-07-21 09:13:59  163.932299
45  37.446650 -122.150456     17.149 2015-07-21 09:14:04    1.785305
46  37.446650 -122.150443     15.792 2015-07-21 09:14:09    1.156947
47  37.446643 -122.150418     13.027 2015-07-21 09:14:19    2.335643
48  37.446635 -122.150407     12.401 2015-07-21 09:14:24    1.325633
49  37.446579 -122.150333     11.774 2015-07-21 09:14:29    9.039363
50  37.446579 -122.150333     11.774 2015-07-21 09:14:39    0.000000
51  37.445610 -122.148873     23.281 2015-07-21 09:14:45  167.980866
52  37.445558 -122.148810     22.076 2015-07-21 09:14:50    7.946035
53  37.445517 -122.148756     21.074 2015-07-21 09:14:55    6.675638
54  37.445358 -122.148448     16.436 2015-07-21 09:15:05   32.411007
55  37.445289 -122.148311     14.304 2015-07-21 09:15:15   14.332115
56  37.445273 -122.148274     13.487 2015-07-21 09:15:20    3.710192
57  37.445260 -122.148250     13.039 2015-07-21 09:15:25    2.606601
58  37.445231 -122.148198     12.259 2015-07-21 09:15:30    5.515709
59  37.445213 -122.148164     11.652 2015-07-21 09:15:35    3.701387
60  37.445197 -122.148136     11.086 2015-07-21 09:15:40    2.998960
61  37.444834 -122.146778     40.500 2015-07-21 09:16:45  126.490825
62  37.444768 -122.146821     36.083 2015-07-21 09:16:50    8.246373
63  37.444633 -122.146923     31.822 2015-07-21 09:16:55   17.513685
64  37.444564 -122.146842     25.022 2015-07-21 09:17:00   10.480021
65  37.444533 -122.146807     22.331 2015-07-21 09:17:05    4.682444
66  37.444491 -122.146761     19.225 2015-07-21 09:17:15    6.188076
67  37.444473 -122.146742     18.264 2015-07-21 09:17:20    2.580634
68  37.444421 -122.146684     15.780 2015-07-21 09:17:30    7.706798
69  37.444410 -122.146667     15.178 2015-07-21 09:17:35    1.908564
70  37.444372 -122.146611     13.790 2015-07-21 09:17:40    6.553111

[71 rows x 5 columns]

In [51]:
get_jul_dt = lambda date: pydt.datetime(2015,7,date,tzinfo=pytz.timezone("America/Los_Angeles"))

In [52]:
transitions_df_23 = lq.get_transitions_df(myUUID, "time", get_jul_dt(23), get_jul_dt(24))

In [53]:
stopped_transitions_df_23 = transitions_df_23[transitions_df_23.transition == "local.transition.stopped_moving"]

In [54]:
stopped_transitions_df_23


Out[54]:
currState filter key platform read_ts transition type write_ts formatted_time
1 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437665103716 2015-07-23 08:25:03
3 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437665172261 2015-07-23 08:26:12
5 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437665179009 2015-07-23 08:26:19
7 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437665247405 2015-07-23 08:27:27
9 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437667909507 2015-07-23 09:11:49
11 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437672863987 2015-07-23 10:34:23
13 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437687309770 2015-07-23 14:35:09
15 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437688881184 2015-07-23 15:01:21
17 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437688894926 2015-07-23 15:01:34
19 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437688907259 2015-07-23 15:01:47
21 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437688920266 2015-07-23 15:02:00
23 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437688932772 2015-07-23 15:02:12
25 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437688945641 2015-07-23 15:02:25
27 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437688958129 2015-07-23 15:02:38
29 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437688971102 2015-07-23 15:02:51
31 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437690874718 2015-07-23 15:34:34
33 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437695898818 2015-07-23 16:58:18
35 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437705850247 2015-07-23 19:44:10
37 local.state.ongoing_trip time statemachine/transition android 0 local.transition.stopped_moving message 1437711667946 2015-07-23 21:21:07

In [61]:
started_transitions_df_23 = transitions_df_23[transitions_df_23.transition == "local.transition.exited_geofence"]

In [62]:
started_transitions_df_23


Out[62]:
currState filter key platform read_ts transition type write_ts formatted_time
0 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437664587604 2015-07-23 08:16:27
2 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437665168106 2015-07-23 08:26:08
4 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437665176285 2015-07-23 08:26:16
6 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437665241156 2015-07-23 08:27:21
8 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437665253416 2015-07-23 08:27:33
10 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437668195110 2015-07-23 09:16:35
12 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437687065159 2015-07-23 14:31:05
14 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437687431530 2015-07-23 14:37:11
16 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437688887992 2015-07-23 15:01:27
18 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437688900984 2015-07-23 15:01:40
20 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437688913861 2015-07-23 15:01:53
22 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437688926582 2015-07-23 15:02:06
24 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437688938915 2015-07-23 15:02:18
26 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437688951671 2015-07-23 15:02:31
28 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437688964527 2015-07-23 15:02:44
30 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437688977796 2015-07-23 15:02:57
32 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437691058633 2015-07-23 15:37:38
34 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437705607364 2015-07-23 19:40:07
36 local.state.waiting_for_trip_start time statemachine/transition android 0 local.transition.exited_geofence message 1437710989758 2015-07-23 21:09:49

In [55]:
reload(lq)


Out[55]:
<module 'emission.storage.decorations.location_queries' from '/Users/shankari/e-mission/e-mission-server/emission/storage/decorations/location_queries.pyc'>

In [56]:
stopped_moving_transitions_df_23 = stopped_transitions_df_23

In [57]:
stopped_moving_points_list_df_23 = lq.get_points_for_transitions(myUUID, stopped_moving_transitions_df_23)


final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437664503716}}, {'data.mTime': {'$lt': 1437665103726}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437664572261}}, {'data.mTime': {'$lt': 1437665172271}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437664579009}}, {'data.mTime': {'$lt': 1437665179019}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437664647405}}, {'data.mTime': {'$lt': 1437665247415}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437667309507}}, {'data.mTime': {'$lt': 1437667909517}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437672263987}}, {'data.mTime': {'$lt': 1437672863997}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437686709770}}, {'data.mTime': {'$lt': 1437687309780}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688281184}}, {'data.mTime': {'$lt': 1437688881194}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688294926}}, {'data.mTime': {'$lt': 1437688894936}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688307259}}, {'data.mTime': {'$lt': 1437688907269}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688320266}}, {'data.mTime': {'$lt': 1437688920276}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688332772}}, {'data.mTime': {'$lt': 1437688932782}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688345641}}, {'data.mTime': {'$lt': 1437688945651}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688358129}}, {'data.mTime': {'$lt': 1437688958139}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688371102}}, {'data.mTime': {'$lt': 1437688971112}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437690274718}}, {'data.mTime': {'$lt': 1437690874728}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437695298818}}, {'data.mTime': {'$lt': 1437695898828}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437705250247}}, {'data.mTime': {'$lt': 1437705850257}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437711067946}}, {'data.mTime': {'$lt': 1437711667956}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': u'time'} 

In [58]:
ipy.inline_map(lo.get_map(stopped_moving_points_list_df_23))


Out[58]:

In [59]:
for idx, transition in stopped_moving_transitions_df_23.iterrows():
    stoppedMovingTs = transition.write_ts
    currSection = ad.AttrDict({'user_id': myUUID, 'loc_filter': 'time',
                               'start_ts': stoppedMovingTs - 10 * 60 * 1000, 'end_ts': stoppedMovingTs + 5})
    last10Points = ls.add_speed(lq.get_points_for_section(currSection))
    lastPoint = ad.AttrDict(last10Points.iloc[-1])
    print "-" * 30 + str(pydt.datetime.fromtimestamp(stoppedMovingTs/1000)) + "\n"
    print "Last 11 distances are %s" % [pf.calDistance(ad.AttrDict(pt), lastPoint) for pt in last10Points.to_dict('records')[-11:]] + "\n"
    fiveMinsAndOlderDf = last10Points[last10Points.mTime < stoppedMovingTs - 5 * 60 * 1000]
    if fiveMinsAndOlderDf.shape[0] > 0:
        print "Distance from 5 mins ago = %s" % pf.calDistance(fiveMinsAndOlderDf.iloc[-1], lastPoint)
    print last10Points[["mLatitude", "mLongitude", "mAccuracy", "formatted_time", "distance"]]


final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437664503716}}, {'data.mTime': {'$lt': 1437665103721}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 08:25:03

Last 11 distances are [118.6762795720348, 84.23454496180636, 70.83051254095994, 81.39357117721113, 82.04280206600234, 71.79787024559754, 71.79787024559754, 73.08927082979012, 0.0, 0.0, 0.0]

Distance from 5 mins ago = 118.676279572
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.391818 -122.085693     10.000 2015-07-23 08:16:14    0.000000
1   37.392049 -122.085186     15.000 2015-07-23 08:16:28   51.628776
2   37.392205 -122.085096     15.000 2015-07-23 08:16:33   19.027604
3   37.392421 -122.085028     15.000 2015-07-23 08:16:38   24.762287
4   37.392631 -122.084884     15.000 2015-07-23 08:16:43   26.661124
5   37.392849 -122.084782     15.000 2015-07-23 08:16:48   25.853830
6   37.392821 -122.084545     15.000 2015-07-23 08:16:53   21.185069
7   37.392581 -122.084233     10.000 2015-07-23 08:16:59   38.378851
8   37.392408 -122.083892     10.000 2015-07-23 08:17:05   35.708871
9   37.392234 -122.083633     10.000 2015-07-23 08:17:11   30.001125
10  37.392213 -122.083435     10.000 2015-07-23 08:17:16   17.631255
11  37.392154 -122.083191     10.000 2015-07-23 08:17:21   22.515285
12  37.392187 -122.082912     10.000 2015-07-23 08:17:26   24.941636
13  37.392384 -122.082715     10.000 2015-07-23 08:17:31   27.926736
14  37.392519 -122.082544     10.000 2015-07-23 08:17:36   21.282716
15  37.392750 -122.082379     10.000 2015-07-23 08:17:42   29.635015
16  37.392985 -122.082179     10.000 2015-07-23 08:17:48   31.477778
17  37.393203 -122.082067     10.000 2015-07-23 08:17:53   26.117249
18  37.393383 -122.081951     10.000 2015-07-23 08:17:59   22.547570
19  37.393246 -122.081706     10.000 2015-07-23 08:18:05   26.521981
20  37.393064 -122.081412     10.000 2015-07-23 08:18:11   32.892505
21  37.392925 -122.081122     10.000 2015-07-23 08:18:16   29.884730
22  37.392840 -122.080987     10.000 2015-07-23 08:18:21   15.251990
23  37.392819 -122.080906     10.000 2015-07-23 08:18:26    7.527845
24  37.393043 -122.080676     10.000 2015-07-23 08:18:31   32.202058
25  37.393309 -122.080537     10.000 2015-07-23 08:18:37   31.946947
26  37.393529 -122.080360     10.000 2015-07-23 08:18:42   29.113543
27  37.393724 -122.080169     10.000 2015-07-23 08:18:47   27.410507
28  37.393980 -122.080019     10.000 2015-07-23 08:18:53   31.384988
29  37.394279 -122.079977     31.500 2015-07-23 08:19:29   33.554116
30  37.394744 -122.077460     37.500 2015-07-23 08:19:59  228.244717
31  37.394538 -122.076939     72.000 2015-07-23 08:20:29   51.438463
32  37.394385 -122.076499     72.000 2015-07-23 08:20:59   42.444530
33  37.394233 -122.076296     31.500 2015-07-23 08:21:29   24.547374
34  37.394227 -122.076296     39.000 2015-07-23 08:21:59    0.669272
35  37.394520 -122.076743     40.500 2015-07-23 08:22:29   51.130052
36  37.394520 -122.076743     84.036 2015-07-23 08:22:58    0.000000
37  37.394438 -122.076654     57.000 2015-07-23 08:23:29   11.995061
38  37.394955 -122.076143     57.000 2015-07-23 08:23:59   73.089271
39  37.394955 -122.076143    105.915 2015-07-23 08:24:32    0.000000
40  37.394955 -122.076143    145.599 2015-07-23 08:24:58    0.000000
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437664572261}}, {'data.mTime': {'$lt': 1437665172266}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 08:26:12

Last 11 distances are [70.83051254095994, 81.39357117721113, 82.04280206600234, 71.79787024559754, 71.79787024559754, 73.08927082979012, 0.0, 0.0, 0.0, 0.0, 0.0]

Distance from 5 mins ago = 70.830512541
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.391818 -122.085693     10.000 2015-07-23 08:16:14    0.000000
1   37.392049 -122.085186     15.000 2015-07-23 08:16:28   51.628776
2   37.392205 -122.085096     15.000 2015-07-23 08:16:33   19.027604
3   37.392421 -122.085028     15.000 2015-07-23 08:16:38   24.762287
4   37.392631 -122.084884     15.000 2015-07-23 08:16:43   26.661124
5   37.392849 -122.084782     15.000 2015-07-23 08:16:48   25.853830
6   37.392821 -122.084545     15.000 2015-07-23 08:16:53   21.185069
7   37.392581 -122.084233     10.000 2015-07-23 08:16:59   38.378851
8   37.392408 -122.083892     10.000 2015-07-23 08:17:05   35.708871
9   37.392234 -122.083633     10.000 2015-07-23 08:17:11   30.001125
10  37.392213 -122.083435     10.000 2015-07-23 08:17:16   17.631255
11  37.392154 -122.083191     10.000 2015-07-23 08:17:21   22.515285
12  37.392187 -122.082912     10.000 2015-07-23 08:17:26   24.941636
13  37.392384 -122.082715     10.000 2015-07-23 08:17:31   27.926736
14  37.392519 -122.082544     10.000 2015-07-23 08:17:36   21.282716
15  37.392750 -122.082379     10.000 2015-07-23 08:17:42   29.635015
16  37.392985 -122.082179     10.000 2015-07-23 08:17:48   31.477778
17  37.393203 -122.082067     10.000 2015-07-23 08:17:53   26.117249
18  37.393383 -122.081951     10.000 2015-07-23 08:17:59   22.547570
19  37.393246 -122.081706     10.000 2015-07-23 08:18:05   26.521981
20  37.393064 -122.081412     10.000 2015-07-23 08:18:11   32.892505
21  37.392925 -122.081122     10.000 2015-07-23 08:18:16   29.884730
22  37.392840 -122.080987     10.000 2015-07-23 08:18:21   15.251990
23  37.392819 -122.080906     10.000 2015-07-23 08:18:26    7.527845
24  37.393043 -122.080676     10.000 2015-07-23 08:18:31   32.202058
25  37.393309 -122.080537     10.000 2015-07-23 08:18:37   31.946947
26  37.393529 -122.080360     10.000 2015-07-23 08:18:42   29.113543
27  37.393724 -122.080169     10.000 2015-07-23 08:18:47   27.410507
28  37.393980 -122.080019     10.000 2015-07-23 08:18:53   31.384988
29  37.394279 -122.079977     31.500 2015-07-23 08:19:29   33.554116
30  37.394744 -122.077460     37.500 2015-07-23 08:19:59  228.244717
31  37.394538 -122.076939     72.000 2015-07-23 08:20:29   51.438463
32  37.394385 -122.076499     72.000 2015-07-23 08:20:59   42.444530
33  37.394233 -122.076296     31.500 2015-07-23 08:21:29   24.547374
34  37.394227 -122.076296     39.000 2015-07-23 08:21:59    0.669272
35  37.394520 -122.076743     40.500 2015-07-23 08:22:29   51.130052
36  37.394520 -122.076743     84.036 2015-07-23 08:22:58    0.000000
37  37.394438 -122.076654     57.000 2015-07-23 08:23:29   11.995061
38  37.394955 -122.076143     57.000 2015-07-23 08:23:59   73.089271
39  37.394955 -122.076143    105.915 2015-07-23 08:24:32    0.000000
40  37.394955 -122.076143    145.599 2015-07-23 08:24:58    0.000000
41  37.394955 -122.076143    857.000 2015-07-23 08:26:04    0.000000
42  37.394955 -122.076143    857.000 2015-07-23 08:26:08    0.000000
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437664579009}}, {'data.mTime': {'$lt': 1437665179014}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 08:26:19

Last 11 distances are [39.185349370638406, 12.152503864197595, 12.152503864197595, 0.16915281655074366, 73.05802192863707, 73.05802192863707, 73.05802192863707, 73.05802192863707, 73.05802192863707, 73.05802192863707, 0.0]

Distance from 5 mins ago = 14.7407347666
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.392049 -122.085186     15.000 2015-07-23 08:16:28    0.000000
1   37.392205 -122.085096     15.000 2015-07-23 08:16:33   19.027604
2   37.392421 -122.085028     15.000 2015-07-23 08:16:38   24.762287
3   37.392631 -122.084884     15.000 2015-07-23 08:16:43   26.661124
4   37.392849 -122.084782     15.000 2015-07-23 08:16:48   25.853830
5   37.392821 -122.084545     15.000 2015-07-23 08:16:53   21.185069
6   37.392581 -122.084233     10.000 2015-07-23 08:16:59   38.378851
7   37.392408 -122.083892     10.000 2015-07-23 08:17:05   35.708871
8   37.392234 -122.083633     10.000 2015-07-23 08:17:11   30.001125
9   37.392213 -122.083435     10.000 2015-07-23 08:17:16   17.631255
10  37.392154 -122.083191     10.000 2015-07-23 08:17:21   22.515285
11  37.392187 -122.082912     10.000 2015-07-23 08:17:26   24.941636
12  37.392384 -122.082715     10.000 2015-07-23 08:17:31   27.926736
13  37.392519 -122.082544     10.000 2015-07-23 08:17:36   21.282716
14  37.392750 -122.082379     10.000 2015-07-23 08:17:42   29.635015
15  37.392985 -122.082179     10.000 2015-07-23 08:17:48   31.477778
16  37.393203 -122.082067     10.000 2015-07-23 08:17:53   26.117249
17  37.393383 -122.081951     10.000 2015-07-23 08:17:59   22.547570
18  37.393246 -122.081706     10.000 2015-07-23 08:18:05   26.521981
19  37.393064 -122.081412     10.000 2015-07-23 08:18:11   32.892505
20  37.392925 -122.081122     10.000 2015-07-23 08:18:16   29.884730
21  37.392840 -122.080987     10.000 2015-07-23 08:18:21   15.251990
22  37.392819 -122.080906     10.000 2015-07-23 08:18:26    7.527845
23  37.393043 -122.080676     10.000 2015-07-23 08:18:31   32.202058
24  37.393309 -122.080537     10.000 2015-07-23 08:18:37   31.946947
25  37.393529 -122.080360     10.000 2015-07-23 08:18:42   29.113543
26  37.393724 -122.080169     10.000 2015-07-23 08:18:47   27.410507
27  37.393980 -122.080019     10.000 2015-07-23 08:18:53   31.384988
28  37.394279 -122.079977     31.500 2015-07-23 08:19:29   33.554116
29  37.394744 -122.077460     37.500 2015-07-23 08:19:59  228.244717
30  37.394538 -122.076939     72.000 2015-07-23 08:20:29   51.438463
31  37.394385 -122.076499     72.000 2015-07-23 08:20:59   42.444530
32  37.394233 -122.076296     31.500 2015-07-23 08:21:29   24.547374
33  37.394227 -122.076296     39.000 2015-07-23 08:21:59    0.669272
34  37.394520 -122.076743     40.500 2015-07-23 08:22:29   51.130052
35  37.394520 -122.076743     84.036 2015-07-23 08:22:58    0.000000
36  37.394438 -122.076654     57.000 2015-07-23 08:23:29   11.995061
37  37.394955 -122.076143     57.000 2015-07-23 08:23:59   73.089271
38  37.394955 -122.076143    105.915 2015-07-23 08:24:32    0.000000
39  37.394955 -122.076143    145.599 2015-07-23 08:24:58    0.000000
40  37.394955 -122.076143    857.000 2015-07-23 08:26:04    0.000000
41  37.394955 -122.076143    857.000 2015-07-23 08:26:08    0.000000
42  37.394955 -122.076143    857.000 2015-07-23 08:26:13    0.000000
43  37.394437 -122.076652     40.500 2015-07-23 08:26:17   73.058022
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437664647405}}, {'data.mTime': {'$lt': 1437665247410}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 08:27:27

Last 11 distances are [12.152503864197595, 0.16915281655074366, 73.05802192863707, 73.05802192863707, 73.05802192863707, 73.05802192863707, 73.05802192863707, 73.05802192863707, 0.0, 0.0, 0.0]

Distance from 5 mins ago = 39.1853493706
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.392384 -122.082715     10.000 2015-07-23 08:17:31    0.000000
1   37.392519 -122.082544     10.000 2015-07-23 08:17:36   21.282716
2   37.392750 -122.082379     10.000 2015-07-23 08:17:42   29.635015
3   37.392985 -122.082179     10.000 2015-07-23 08:17:48   31.477778
4   37.393203 -122.082067     10.000 2015-07-23 08:17:53   26.117249
5   37.393383 -122.081951     10.000 2015-07-23 08:17:59   22.547570
6   37.393246 -122.081706     10.000 2015-07-23 08:18:05   26.521981
7   37.393064 -122.081412     10.000 2015-07-23 08:18:11   32.892505
8   37.392925 -122.081122     10.000 2015-07-23 08:18:16   29.884730
9   37.392840 -122.080987     10.000 2015-07-23 08:18:21   15.251990
10  37.392819 -122.080906     10.000 2015-07-23 08:18:26    7.527845
11  37.393043 -122.080676     10.000 2015-07-23 08:18:31   32.202058
12  37.393309 -122.080537     10.000 2015-07-23 08:18:37   31.946947
13  37.393529 -122.080360     10.000 2015-07-23 08:18:42   29.113543
14  37.393724 -122.080169     10.000 2015-07-23 08:18:47   27.410507
15  37.393980 -122.080019     10.000 2015-07-23 08:18:53   31.384988
16  37.394279 -122.079977     31.500 2015-07-23 08:19:29   33.554116
17  37.394744 -122.077460     37.500 2015-07-23 08:19:59  228.244717
18  37.394538 -122.076939     72.000 2015-07-23 08:20:29   51.438463
19  37.394385 -122.076499     72.000 2015-07-23 08:20:59   42.444530
20  37.394233 -122.076296     31.500 2015-07-23 08:21:29   24.547374
21  37.394227 -122.076296     39.000 2015-07-23 08:21:59    0.669272
22  37.394520 -122.076743     40.500 2015-07-23 08:22:29   51.130052
23  37.394520 -122.076743     84.036 2015-07-23 08:22:58    0.000000
24  37.394438 -122.076654     57.000 2015-07-23 08:23:29   11.995061
25  37.394955 -122.076143     57.000 2015-07-23 08:23:59   73.089271
26  37.394955 -122.076143    105.915 2015-07-23 08:24:32    0.000000
27  37.394955 -122.076143    145.599 2015-07-23 08:24:58    0.000000
28  37.394955 -122.076143    857.000 2015-07-23 08:26:04    0.000000
29  37.394955 -122.076143    857.000 2015-07-23 08:26:08    0.000000
30  37.394955 -122.076143    857.000 2015-07-23 08:26:13    0.000000
31  37.394437 -122.076652     40.500 2015-07-23 08:26:17   73.058022
32  37.394437 -122.076652    808.735 2015-07-23 08:27:19    0.000000
33  37.394437 -122.076652    832.850 2015-07-23 08:27:21    0.000000
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437667309507}}, {'data.mTime': {'$lt': 1437667909512}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 09:11:49

Last 11 distances are [2159.9726768981163, 96.14003519529251, 6.135694200302091, 12.523064129836115, 19.9631265012976, 14.926814850122152, 11.20498772302575, 7.4504322783523955, 6.64449574082115, 12.535656012216005, 0.0]

Distance from 5 mins ago = 2159.9726769
    mLatitude  mLongitude  mAccuracy      formatted_time     distance
0   37.568500 -122.322266   1028.000 2015-07-23 09:02:14     0.000000
1   37.568433 -122.322246   1028.000 2015-07-23 09:02:47     7.695027
2   37.572180 -122.328022     40.500 2015-07-23 09:03:15   657.807709
3   37.572180 -122.328022    419.437 2015-07-23 09:03:44     0.000000
4   37.572180 -122.328022    809.827 2015-07-23 09:04:14     0.000000
5   37.578277 -122.341299     40.500 2015-07-23 09:04:45  1352.357938
6   37.582777 -122.349595     60.000 2015-07-23 09:05:16   885.880893
7   37.582777 -122.349595    437.572 2015-07-23 09:05:45     0.000000
8   37.589065 -122.366295   1074.000 2015-07-23 09:06:15  1629.209761
9   37.599990 -122.386406   1042.000 2015-07-23 09:07:15  2148.304647
10  37.599277 -122.387133     40.500 2015-07-23 09:07:46   101.906959
11  37.599360 -122.386973     42.000 2015-07-23 09:08:16    16.869221
12  37.599278 -122.387327     37.500 2015-07-23 09:08:46    32.486173
13  37.599286 -122.386949     40.500 2015-07-23 09:09:16    33.324121
14  37.599325 -122.386983     36.000 2015-07-23 09:09:46     5.218907
15  37.599277 -122.387164     39.000 2015-07-23 09:10:16    16.861408
16  37.599277 -122.387147     37.500 2015-07-23 09:10:46     1.508510
17  37.599361 -122.386973     37.500 2015-07-23 09:11:16    17.944979
18  37.599329 -122.387110     39.000 2015-07-23 09:11:46    12.535656
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437672263987}}, {'data.mTime': {'$lt': 1437672863992}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 10:34:23

Last 11 distances are [46.1427209063442, 44.369576728958535, 25.217315106696446, 52.427568812026955, 44.291444878407034, 3.4804454741413458, 6.076633512274382, 3.4319446094983417, 3.460834766313353, 1.1680744782924628, 0.0]

Distance from 5 mins ago = 46.1427209063
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.873661 -122.261259     96.076 2015-07-23 10:24:47    0.000000
1   37.873787 -122.261458     63.000 2015-07-23 10:25:18   22.384571
2   37.873787 -122.261458    106.540 2015-07-23 10:25:47    0.000000
3   37.875204 -122.259827     36.000 2015-07-23 10:26:18  212.895732
4   37.875029 -122.260242     42.000 2015-07-23 10:26:48   41.320951
5   37.874964 -122.260372     42.000 2015-07-23 10:27:18   13.526186
6   37.874963 -122.260114     45.000 2015-07-23 10:27:48   22.715488
7   37.874976 -122.259838     30.000 2015-07-23 10:28:18   24.249317
8   37.874884 -122.259319     30.000 2015-07-23 10:28:48   46.682106
9   37.874927 -122.259161     30.000 2015-07-23 10:29:18   14.687320
10  37.874901 -122.259107     48.000 2015-07-23 10:29:52    5.576093
11  37.874995 -122.258912     30.000 2015-07-23 10:30:12   19.979129
12  37.875517 -122.258328     30.000 2015-07-23 10:30:34   77.505431
13  37.875512 -122.258469     37.500 2015-07-23 10:31:20   12.379471
14  37.875146 -122.258741     24.692 2015-07-23 10:31:52   47.248011
15  37.875123 -122.258747     30.000 2015-07-23 10:32:22    2.621330
16  37.875148 -122.258756     30.000 2015-07-23 10:32:52    3.000682
17  37.875148 -122.258755     30.000 2015-07-23 10:33:22    0.145458
18  37.875188 -122.258741     40.500 2015-07-23 10:33:52    4.586012
19  37.875177 -122.258741     31.500 2015-07-23 10:34:22    1.168074
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437686709770}}, {'data.mTime': {'$lt': 1437687309775}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 14:35:09

Last 11 distances are [17.442139842880493, 77.82196208280342, 71.14092962257278, 70.26988841203128, 69.41036990346805, 17.519212305155744, 13.81208124342218, 17.144232378270313, 17.144232378270313, 0.0]

   mLatitude  mLongitude  mAccuracy      formatted_time   distance
0  37.875186 -122.258736    741.000 2015-07-23 14:30:59   0.000000
1  37.875735 -122.258701     27.000 2015-07-23 14:31:07  61.102380
2  37.875652 -122.258574     30.000 2015-07-23 14:31:37  14.347429
3  37.875659 -122.258650     31.500 2015-07-23 14:32:07   6.644835
4  37.875638 -122.258582     30.000 2015-07-23 14:32:37   6.372282
5  37.875134 -122.258649     20.455 2015-07-23 14:33:07  56.315846
6  37.875096 -122.258669     30.000 2015-07-23 14:33:37   4.579509
7  37.875127 -122.258648     20.820 2015-07-23 14:34:06   3.912178
8  37.875127 -122.258648     66.984 2015-07-23 14:34:37   0.000000
9  37.875040 -122.258809     30.000 2015-07-23 14:35:06  17.144232
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688281184}}, {'data.mTime': {'$lt': 1437688881189}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 15:01:21

Last 11 distances are [571.8729982966498, 23.262244018875062, 23.262244018875062, 23.262244018875062, 23.262244018875062, 23.262244018875062, 0.0, 0.0, 0.0, 0.0, 0.0]

Distance from 5 mins ago = 571.872998297
    mLatitude  mLongitude  mAccuracy      formatted_time     distance
0   37.847034 -122.271473     36.000 2015-07-23 14:51:44     0.000000
1   37.841296 -122.270044     42.000 2015-07-23 14:52:14   650.268146
2   37.841296 -122.270044    419.246 2015-07-23 14:52:43     0.000000
3   37.831242 -122.267532    953.000 2015-07-23 14:53:13  1139.474556
4   37.831242 -122.267532    953.000 2015-07-23 14:53:43     0.000000
5   37.831242 -122.267532    953.000 2015-07-23 14:54:13     0.000000
6   37.829627 -122.267972    953.000 2015-07-23 14:54:46   183.715697
7   37.825291 -122.268436    868.000 2015-07-23 14:55:15   483.875195
8   37.815736 -122.271721    820.000 2015-07-23 14:56:13  1100.891236
9   37.811089 -122.275026   1874.000 2015-07-23 14:56:43   592.695610
10  37.811089 -122.275026   1874.000 2015-07-23 14:57:14     0.000000
11  37.811089 -122.275026   1874.000 2015-07-23 14:57:44     0.000000
12  37.811089 -122.275026   1874.000 2015-07-23 14:58:14     0.000000
13  37.811089 -122.275026   1874.000 2015-07-23 14:58:44     0.000000
14  37.811208 -122.274808   1890.000 2015-07-23 14:59:14    23.262244
15  37.811208 -122.274808   1890.000 2015-07-23 14:59:44     0.000000
16  37.811208 -122.274808   1890.000 2015-07-23 15:00:14     0.000000
17  37.811208 -122.274808   1890.000 2015-07-23 15:00:44     0.000000
18  37.811208 -122.274808   1890.000 2015-07-23 15:01:14     0.000000
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688294926}}, {'data.mTime': {'$lt': 1437688894931}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 15:01:34

Last 11 distances are [11.631573248132806, 11.631573248132806, 11.631573248132806, 11.631573248132806, 11.630675080904174, 11.630675080904174, 11.630675080904174, 11.630675080904174, 11.630675080904174, 0.0, 0.0]

Distance from 5 mins ago = 582.263969871
    mLatitude  mLongitude  mAccuracy      formatted_time     distance
0   37.847034 -122.271473     36.000 2015-07-23 14:51:44     0.000000
1   37.841296 -122.270044     42.000 2015-07-23 14:52:14   650.268146
2   37.841296 -122.270044    419.246 2015-07-23 14:52:43     0.000000
3   37.831242 -122.267532    953.000 2015-07-23 14:53:13  1139.474556
4   37.831242 -122.267532    953.000 2015-07-23 14:53:43     0.000000
5   37.831242 -122.267532    953.000 2015-07-23 14:54:13     0.000000
6   37.829627 -122.267972    953.000 2015-07-23 14:54:46   183.715697
7   37.825291 -122.268436    868.000 2015-07-23 14:55:15   483.875195
8   37.815736 -122.271721    820.000 2015-07-23 14:56:13  1100.891236
9   37.811089 -122.275026   1874.000 2015-07-23 14:56:43   592.695610
10  37.811089 -122.275026   1874.000 2015-07-23 14:57:14     0.000000
11  37.811089 -122.275026   1874.000 2015-07-23 14:57:44     0.000000
12  37.811089 -122.275026   1874.000 2015-07-23 14:58:14     0.000000
13  37.811089 -122.275026   1874.000 2015-07-23 14:58:44     0.000000
14  37.811208 -122.274808   1890.000 2015-07-23 14:59:14    23.262244
15  37.811208 -122.274808   1890.000 2015-07-23 14:59:44     0.000000
16  37.811208 -122.274808   1890.000 2015-07-23 15:00:14     0.000000
17  37.811208 -122.274808   1890.000 2015-07-23 15:00:44     0.000000
18  37.811208 -122.274808   1890.000 2015-07-23 15:01:14     0.000000
19  37.811149 -122.274917   1874.000 2015-07-23 15:01:21    11.630675
20  37.811149 -122.274917   1874.000 2015-07-23 15:01:31     0.000000
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688307259}}, {'data.mTime': {'$lt': 1437688907264}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 15:01:47

Last 11 distances are [11.631573248132806, 11.631573248132806, 11.630675080904174, 11.630675080904174, 11.630675080904174, 11.630675080904174, 11.630675080904174, 0.0, 0.0, 0.0, 0.0]

Distance from 5 mins ago = 11.6315732481
    mLatitude  mLongitude  mAccuracy      formatted_time     distance
0   37.841296 -122.270044     42.000 2015-07-23 14:52:14     0.000000
1   37.841296 -122.270044    419.246 2015-07-23 14:52:43     0.000000
2   37.831242 -122.267532    953.000 2015-07-23 14:53:13  1139.474556
3   37.831242 -122.267532    953.000 2015-07-23 14:53:43     0.000000
4   37.831242 -122.267532    953.000 2015-07-23 14:54:13     0.000000
5   37.829627 -122.267972    953.000 2015-07-23 14:54:46   183.715697
6   37.825291 -122.268436    868.000 2015-07-23 14:55:15   483.875195
7   37.815736 -122.271721    820.000 2015-07-23 14:56:13  1100.891236
8   37.811089 -122.275026   1874.000 2015-07-23 14:56:43   592.695610
9   37.811089 -122.275026   1874.000 2015-07-23 14:57:14     0.000000
10  37.811089 -122.275026   1874.000 2015-07-23 14:57:44     0.000000
11  37.811089 -122.275026   1874.000 2015-07-23 14:58:14     0.000000
12  37.811089 -122.275026   1874.000 2015-07-23 14:58:44     0.000000
13  37.811208 -122.274808   1890.000 2015-07-23 14:59:14    23.262244
14  37.811208 -122.274808   1890.000 2015-07-23 14:59:44     0.000000
15  37.811208 -122.274808   1890.000 2015-07-23 15:00:14     0.000000
16  37.811208 -122.274808   1890.000 2015-07-23 15:00:44     0.000000
17  37.811208 -122.274808   1890.000 2015-07-23 15:01:14     0.000000
18  37.811149 -122.274917   1874.000 2015-07-23 15:01:21    11.630675
19  37.811149 -122.274917   1874.000 2015-07-23 15:01:31     0.000000
20  37.811149 -122.274917   1874.000 2015-07-23 15:01:35     0.000000
21  37.811149 -122.274917   1874.000 2015-07-23 15:01:41     0.000000
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688320266}}, {'data.mTime': {'$lt': 1437688920271}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 15:02:00

Last 11 distances are [19.647305091564093, 19.647305091564093, 19.647305091564093, 19.647305091564093, 19.647305091564093, 12.842064742294808, 12.842064742294808, 12.842064742294808, 12.842064742294808, 7.320469743392599, 0.0]

Distance from 5 mins ago = 14.6298258564
    mLatitude  mLongitude  mAccuracy      formatted_time     distance
0   37.841296 -122.270044     42.000 2015-07-23 14:52:14     0.000000
1   37.841296 -122.270044    419.246 2015-07-23 14:52:43     0.000000
2   37.831242 -122.267532    953.000 2015-07-23 14:53:13  1139.474556
3   37.831242 -122.267532    953.000 2015-07-23 14:53:43     0.000000
4   37.831242 -122.267532    953.000 2015-07-23 14:54:13     0.000000
5   37.829627 -122.267972    953.000 2015-07-23 14:54:46   183.715697
6   37.825291 -122.268436    868.000 2015-07-23 14:55:15   483.875195
7   37.815736 -122.271721    820.000 2015-07-23 14:56:13  1100.891236
8   37.811089 -122.275026   1874.000 2015-07-23 14:56:43   592.695610
9   37.811089 -122.275026   1874.000 2015-07-23 14:57:14     0.000000
10  37.811089 -122.275026   1874.000 2015-07-23 14:57:44     0.000000
11  37.811089 -122.275026   1874.000 2015-07-23 14:58:14     0.000000
12  37.811089 -122.275026   1874.000 2015-07-23 14:58:44     0.000000
13  37.811208 -122.274808   1890.000 2015-07-23 14:59:14    23.262244
14  37.811208 -122.274808   1890.000 2015-07-23 14:59:44     0.000000
15  37.811208 -122.274808   1890.000 2015-07-23 15:00:14     0.000000
16  37.811208 -122.274808   1890.000 2015-07-23 15:00:44     0.000000
17  37.811208 -122.274808   1890.000 2015-07-23 15:01:14     0.000000
18  37.811149 -122.274917   1874.000 2015-07-23 15:01:21    11.630675
19  37.811149 -122.274917   1874.000 2015-07-23 15:01:31     0.000000
20  37.811149 -122.274917   1874.000 2015-07-23 15:01:35     0.000000
21  37.811149 -122.274917   1874.000 2015-07-23 15:01:41     0.000000
22  37.811286 -122.275034   1874.000 2015-07-23 15:01:47    18.450620
23  37.811220 -122.275031   1874.000 2015-07-23 15:01:57     7.320470
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688332772}}, {'data.mTime': {'$lt': 1437688932777}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 15:02:12

Last 11 distances are [19.647305091564093, 19.647305091564093, 19.647305091564093, 12.842064742294808, 12.842064742294808, 12.842064742294808, 12.842064742294808, 7.320469743392599, 0.0, 0.0, 0.0]

Distance from 5 mins ago = 14.6298258564
    mLatitude  mLongitude  mAccuracy      formatted_time     distance
0   37.841296 -122.270044     42.000 2015-07-23 14:52:14     0.000000
1   37.841296 -122.270044    419.246 2015-07-23 14:52:43     0.000000
2   37.831242 -122.267532    953.000 2015-07-23 14:53:13  1139.474556
3   37.831242 -122.267532    953.000 2015-07-23 14:53:43     0.000000
4   37.831242 -122.267532    953.000 2015-07-23 14:54:13     0.000000
5   37.829627 -122.267972    953.000 2015-07-23 14:54:46   183.715697
6   37.825291 -122.268436    868.000 2015-07-23 14:55:15   483.875195
7   37.815736 -122.271721    820.000 2015-07-23 14:56:13  1100.891236
8   37.811089 -122.275026   1874.000 2015-07-23 14:56:43   592.695610
9   37.811089 -122.275026   1874.000 2015-07-23 14:57:14     0.000000
10  37.811089 -122.275026   1874.000 2015-07-23 14:57:44     0.000000
11  37.811089 -122.275026   1874.000 2015-07-23 14:58:14     0.000000
12  37.811089 -122.275026   1874.000 2015-07-23 14:58:44     0.000000
13  37.811208 -122.274808   1890.000 2015-07-23 14:59:14    23.262244
14  37.811208 -122.274808   1890.000 2015-07-23 14:59:44     0.000000
15  37.811208 -122.274808   1890.000 2015-07-23 15:00:14     0.000000
16  37.811208 -122.274808   1890.000 2015-07-23 15:00:44     0.000000
17  37.811208 -122.274808   1890.000 2015-07-23 15:01:14     0.000000
18  37.811149 -122.274917   1874.000 2015-07-23 15:01:21    11.630675
19  37.811149 -122.274917   1874.000 2015-07-23 15:01:31     0.000000
20  37.811149 -122.274917   1874.000 2015-07-23 15:01:35     0.000000
21  37.811149 -122.274917   1874.000 2015-07-23 15:01:41     0.000000
22  37.811286 -122.275034   1874.000 2015-07-23 15:01:47    18.450620
23  37.811220 -122.275031   1874.000 2015-07-23 15:01:57     7.320470
24  37.811220 -122.275031   1874.000 2015-07-23 15:02:00     0.000000
25  37.811220 -122.275031   1874.000 2015-07-23 15:02:06     0.000000
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688345641}}, {'data.mTime': {'$lt': 1437688945646}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 15:02:25

Last 11 distances are [14.434659351552895, 12.949425161875679, 12.949425161875679, 12.949425161875679, 12.949425161875679, 7.223581716487023, 7.756482402483771, 7.756482402483771, 7.756482402483771, 0.0, 0.0]

Distance from 5 mins ago = 19.9309047015
    mLatitude  mLongitude  mAccuracy      formatted_time     distance
0   37.841296 -122.270044    419.246 2015-07-23 14:52:43     0.000000
1   37.831242 -122.267532    953.000 2015-07-23 14:53:13  1139.474556
2   37.831242 -122.267532    953.000 2015-07-23 14:53:43     0.000000
3   37.831242 -122.267532    953.000 2015-07-23 14:54:13     0.000000
4   37.829627 -122.267972    953.000 2015-07-23 14:54:46   183.715697
5   37.825291 -122.268436    868.000 2015-07-23 14:55:15   483.875195
6   37.815736 -122.271721    820.000 2015-07-23 14:56:13  1100.891236
7   37.811089 -122.275026   1874.000 2015-07-23 14:56:43   592.695610
8   37.811089 -122.275026   1874.000 2015-07-23 14:57:14     0.000000
9   37.811089 -122.275026   1874.000 2015-07-23 14:57:44     0.000000
10  37.811089 -122.275026   1874.000 2015-07-23 14:58:14     0.000000
11  37.811089 -122.275026   1874.000 2015-07-23 14:58:44     0.000000
12  37.811208 -122.274808   1890.000 2015-07-23 14:59:14    23.262244
13  37.811208 -122.274808   1890.000 2015-07-23 14:59:44     0.000000
14  37.811208 -122.274808   1890.000 2015-07-23 15:00:14     0.000000
15  37.811208 -122.274808   1890.000 2015-07-23 15:00:44     0.000000
16  37.811208 -122.274808   1890.000 2015-07-23 15:01:14     0.000000
17  37.811149 -122.274917   1874.000 2015-07-23 15:01:21    11.630675
18  37.811149 -122.274917   1874.000 2015-07-23 15:01:31     0.000000
19  37.811149 -122.274917   1874.000 2015-07-23 15:01:35     0.000000
20  37.811149 -122.274917   1874.000 2015-07-23 15:01:41     0.000000
21  37.811286 -122.275034   1874.000 2015-07-23 15:01:47    18.450620
22  37.811220 -122.275031   1874.000 2015-07-23 15:01:57     7.320470
23  37.811220 -122.275031   1874.000 2015-07-23 15:02:00     0.000000
24  37.811220 -122.275031   1874.000 2015-07-23 15:02:06     0.000000
25  37.811260 -122.274958   1874.000 2015-07-23 15:02:13     7.756482
26  37.811260 -122.274958   1874.000 2015-07-23 15:02:19     0.000000
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688358129}}, {'data.mTime': {'$lt': 1437688958134}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 15:02:38

Last 11 distances are [0.0, 0.0, 0.0, 18.45062010157755, 12.842064742294808, 12.842064742294808, 12.842064742294808, 12.949425161875679, 12.949425161875679, 0.0, 0.0]

Distance from 5 mins ago = 11.6315732481
    mLatitude  mLongitude  mAccuracy      formatted_time     distance
0   37.841296 -122.270044    419.246 2015-07-23 14:52:43     0.000000
1   37.831242 -122.267532    953.000 2015-07-23 14:53:13  1139.474556
2   37.831242 -122.267532    953.000 2015-07-23 14:53:43     0.000000
3   37.831242 -122.267532    953.000 2015-07-23 14:54:13     0.000000
4   37.829627 -122.267972    953.000 2015-07-23 14:54:46   183.715697
5   37.825291 -122.268436    868.000 2015-07-23 14:55:15   483.875195
6   37.815736 -122.271721    820.000 2015-07-23 14:56:13  1100.891236
7   37.811089 -122.275026   1874.000 2015-07-23 14:56:43   592.695610
8   37.811089 -122.275026   1874.000 2015-07-23 14:57:14     0.000000
9   37.811089 -122.275026   1874.000 2015-07-23 14:57:44     0.000000
10  37.811089 -122.275026   1874.000 2015-07-23 14:58:14     0.000000
11  37.811089 -122.275026   1874.000 2015-07-23 14:58:44     0.000000
12  37.811208 -122.274808   1890.000 2015-07-23 14:59:14    23.262244
13  37.811208 -122.274808   1890.000 2015-07-23 14:59:44     0.000000
14  37.811208 -122.274808   1890.000 2015-07-23 15:00:14     0.000000
15  37.811208 -122.274808   1890.000 2015-07-23 15:00:44     0.000000
16  37.811208 -122.274808   1890.000 2015-07-23 15:01:14     0.000000
17  37.811149 -122.274917   1874.000 2015-07-23 15:01:21    11.630675
18  37.811149 -122.274917   1874.000 2015-07-23 15:01:31     0.000000
19  37.811149 -122.274917   1874.000 2015-07-23 15:01:35     0.000000
20  37.811149 -122.274917   1874.000 2015-07-23 15:01:41     0.000000
21  37.811286 -122.275034   1874.000 2015-07-23 15:01:47    18.450620
22  37.811220 -122.275031   1874.000 2015-07-23 15:01:57     7.320470
23  37.811220 -122.275031   1874.000 2015-07-23 15:02:00     0.000000
24  37.811220 -122.275031   1874.000 2015-07-23 15:02:06     0.000000
25  37.811260 -122.274958   1874.000 2015-07-23 15:02:13     7.756482
26  37.811260 -122.274958   1874.000 2015-07-23 15:02:19     0.000000
27  37.811149 -122.274917   1874.000 2015-07-23 15:02:31    12.949425
28  37.811149 -122.274917   1874.000 2015-07-23 15:02:32     0.000000
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688371102}}, {'data.mTime': {'$lt': 1437688971107}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 15:02:51

Last 11 distances are [11.630675080904174, 21.65824055353486, 19.647305091564093, 19.647305091564093, 19.647305091564093, 14.434659351552895, 14.434659351552895, 11.630675080904174, 11.630675080904174, 0.0, 0.0]

Distance from 5 mins ago = 23.2622440189
    mLatitude  mLongitude  mAccuracy      formatted_time     distance
0   37.831242 -122.267532        953 2015-07-23 14:53:13     0.000000
1   37.831242 -122.267532        953 2015-07-23 14:53:43     0.000000
2   37.831242 -122.267532        953 2015-07-23 14:54:13     0.000000
3   37.829627 -122.267972        953 2015-07-23 14:54:46   183.715697
4   37.825291 -122.268436        868 2015-07-23 14:55:15   483.875195
5   37.815736 -122.271721        820 2015-07-23 14:56:13  1100.891236
6   37.811089 -122.275026       1874 2015-07-23 14:56:43   592.695610
7   37.811089 -122.275026       1874 2015-07-23 14:57:14     0.000000
8   37.811089 -122.275026       1874 2015-07-23 14:57:44     0.000000
9   37.811089 -122.275026       1874 2015-07-23 14:58:14     0.000000
10  37.811089 -122.275026       1874 2015-07-23 14:58:44     0.000000
11  37.811208 -122.274808       1890 2015-07-23 14:59:14    23.262244
12  37.811208 -122.274808       1890 2015-07-23 14:59:44     0.000000
13  37.811208 -122.274808       1890 2015-07-23 15:00:14     0.000000
14  37.811208 -122.274808       1890 2015-07-23 15:00:44     0.000000
15  37.811208 -122.274808       1890 2015-07-23 15:01:14     0.000000
16  37.811149 -122.274917       1874 2015-07-23 15:01:21    11.630675
17  37.811149 -122.274917       1874 2015-07-23 15:01:31     0.000000
18  37.811149 -122.274917       1874 2015-07-23 15:01:35     0.000000
19  37.811149 -122.274917       1874 2015-07-23 15:01:41     0.000000
20  37.811286 -122.275034       1874 2015-07-23 15:01:47    18.450620
21  37.811220 -122.275031       1874 2015-07-23 15:01:57     7.320470
22  37.811220 -122.275031       1874 2015-07-23 15:02:00     0.000000
23  37.811220 -122.275031       1874 2015-07-23 15:02:06     0.000000
24  37.811260 -122.274958       1874 2015-07-23 15:02:13     7.756482
25  37.811260 -122.274958       1874 2015-07-23 15:02:19     0.000000
26  37.811149 -122.274917       1874 2015-07-23 15:02:31    12.949425
27  37.811149 -122.274917       1874 2015-07-23 15:02:32     0.000000
28  37.811208 -122.274808       1890 2015-07-23 15:02:38    11.630675
29  37.811208 -122.274808       1890 2015-07-23 15:02:44     0.000000
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437690274718}}, {'data.mTime': {'$lt': 1437690874723}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 15:34:34

Last 11 distances are [147.30859239757, 64.84831838538051, 43.43183320513154, 46.29287442003442, 24.43991415117892, 24.43991415117892, 24.43991415117892, 88.29700713025164, 88.29700713025164, 46.107092251161895, 0.0]

Distance from 5 mins ago = 147.308592398
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.781182 -122.388901     39.000 2015-07-23 15:25:00    0.000000
1   37.780413 -122.389542     39.000 2015-07-23 15:25:31  102.354796
2   37.779475 -122.390619     39.000 2015-07-23 15:26:01  140.873616
3   37.778525 -122.391698     40.500 2015-07-23 15:26:31  141.942726
4   37.777691 -122.392420     76.499 2015-07-23 15:27:01  112.344641
5   37.776557 -122.393764     57.983 2015-07-23 15:27:31  172.820150
6   37.776500 -122.394330     37.500 2015-07-23 15:28:01   50.199713
7   37.776295 -122.394342     36.000 2015-07-23 15:28:31   22.797539
8   37.776456 -122.394731     48.000 2015-07-23 15:29:01   38.605423
9   37.777336 -122.394977     95.998 2015-07-23 15:29:31  100.237156
10  37.776590 -122.394944     36.000 2015-07-23 15:30:01   83.016017
11  37.776381 -122.394599     38.555 2015-07-23 15:30:31   38.195028
12  37.776417 -122.394631     45.000 2015-07-23 15:31:01    4.893860
13  37.776230 -122.394706     57.000 2015-07-23 15:31:31   21.853029
14  37.776230 -122.394706    434.207 2015-07-23 15:32:00    0.000000
15  37.776230 -122.394706    824.337 2015-07-23 15:32:30    0.000000
16  37.775398 -122.395414     57.000 2015-07-23 15:33:01  111.460477
17  37.775398 -122.395414    433.779 2015-07-23 15:33:30    0.000000
18  37.776370 -122.394509     40.500 2015-07-23 15:34:01  134.234484
19  37.776020 -122.394789     79.500 2015-07-23 15:34:23   46.107092
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437695298818}}, {'data.mTime': {'$lt': 1437695898823}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 16:58:18

Last 11 distances are [27.99758528167523, 16.79362479737564, 5.415229917520953, 30.154250627153793, 40.80022591524176, 27.546012414466198, 8.430091377052733, 20.268896989511077, 1.7997452155862284, 0.0]

   mLatitude  mLongitude  mAccuracy      formatted_time   distance
0  37.391677 -122.080259       42.0 2015-07-23 16:53:47   0.000000
1  37.391779 -122.080211       42.0 2015-07-23 16:54:17  12.096365
2  37.391916 -122.080030       48.0 2015-07-23 16:54:47  22.128798
3  37.391683 -122.080304       36.0 2015-07-23 16:55:17  35.543754
4  37.391512 -122.080102       60.0 2015-07-23 16:55:47  26.111304
5  37.391644 -122.080172       45.0 2015-07-23 16:56:17  15.978563
6  37.391927 -122.079995       39.0 2015-07-23 16:56:47  35.103273
7  37.391820 -122.080285       58.5 2015-07-23 16:57:17  28.256502
8  37.391893 -122.080060       40.5 2015-07-23 16:57:47  21.433690
9  37.391877 -122.080067       40.5 2015-07-23 16:58:17   1.799745
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437705250247}}, {'data.mTime': {'$lt': 1437705850252}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 19:44:10

Last 11 distances are [41.97239264287058, 29.21305158215058, 8.996936800460348, 2.3034595730894853, 14.089558393981251, 13.724741189826789, 22.510730994405407, 11.366972464552225, 27.634075413157937, 0.0]

   mLatitude  mLongitude  mAccuracy      formatted_time   distance
0  37.391689 -122.080219    811.779 2015-07-23 19:40:05   0.000000
1  37.391783 -122.079946     64.500 2015-07-23 19:40:08  26.226690
2  37.391982 -122.079956     36.000 2015-07-23 19:40:38  22.191297
3  37.392056 -122.080041     61.500 2015-07-23 19:41:08  11.081768
4  37.391913 -122.079994     45.000 2015-07-23 19:41:38  16.382116
5  37.392160 -122.080035     39.000 2015-07-23 19:42:08  27.650161
6  37.392235 -122.079980     40.500 2015-07-23 19:42:38   9.646047
7  37.392118 -122.079954     37.500 2015-07-23 19:43:08  13.201609
8  37.391800 -122.080128     48.000 2015-07-23 19:43:39  38.539901
9  37.392036 -122.080032     45.000 2015-07-23 19:44:09  27.634075
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437711067946}}, {'data.mTime': {'$lt': 1437711667951}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
------------------------------2015-07-23 21:21:07

Last 11 distances are [273.843025373454, 6.970236333505402, 7.236104810049376, 9.857435968209971, 2.261419607244882, 2.240698576693022, 2.39332398446444, 2.669879772245125, 0.0, 3.734748707234379, 0.0]

Distance from 5 mins ago = 273.843025373
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.390070 -122.081671    240.078 2015-07-23 21:11:20    0.000000
1   37.391201 -122.084051     48.000 2015-07-23 21:11:50  245.005304
2   37.392160 -122.085416     45.000 2015-07-23 21:12:21  161.000293
3   37.391869 -122.085717     69.992 2015-07-23 21:12:51   41.811788
4   37.390920 -122.086262     31.500 2015-07-23 21:13:21  116.003200
5   37.390920 -122.086243     37.500 2015-07-23 21:13:51    1.696272
6   37.390929 -122.086255     37.500 2015-07-23 21:14:21    1.481457
7   37.390928 -122.086256     37.500 2015-07-23 21:14:51    0.094172
8   37.390913 -122.086291     30.000 2015-07-23 21:15:21    3.505363
9   37.390911 -122.086291     21.213 2015-07-23 21:15:30    0.211455
10  37.388774 -122.087694     37.500 2015-07-23 21:16:05  268.067948
11  37.390899 -122.086289     40.500 2015-07-23 21:16:35  266.934002
12  37.390897 -122.086291     37.500 2015-07-23 21:17:05    0.287073
13  37.390876 -122.086304     34.500 2015-07-23 21:17:35    2.630010
14  37.390938 -122.086258     31.500 2015-07-23 21:18:06    8.006660
15  37.390938 -122.086259     33.000 2015-07-23 21:18:36    0.071546
16  37.390937 -122.086259     52.500 2015-07-23 21:19:06    0.156672
17  37.390934 -122.086259     33.000 2015-07-23 21:19:36    0.277987
18  37.390958 -122.086262     55.500 2015-07-23 21:20:06    2.669880
19  37.390925 -122.086253     30.000 2015-07-23 21:20:36    3.734749
20  37.390958 -122.086262     55.500 2015-07-23 21:21:06    3.734749

In [67]:
for idx, transition in stopped_moving_transitions_df_23.iterrows():
    stoppedMovingTs = transition.write_ts
    currSection = ad.AttrDict({'user_id': myUUID, 'loc_filter': 'time',
                               'start_ts': stoppedMovingTs - 10 * 60 * 1000, 'end_ts': stoppedMovingTs + 5})
    last10Points = ls.add_speed(ls.filter_accuracy(lq.get_points_for_section(currSection)))
    print "last10Points.shape = %s" % str(last10Points.shape)
    if last10Points.shape[0] == 0 or last10Points.shape[1] == 2:
        print "No points found in the past 10 minutes, skipping!"
        continue
    lastPoint = ad.AttrDict(last10Points.iloc[-1])
    print "-" * 30 + str(pydt.datetime.fromtimestamp(stoppedMovingTs/1000)) + "\n"
    print "Last 11 distances are %s" % [pf.calDistance(ad.AttrDict(pt), lastPoint) for pt in last10Points.to_dict('records')[-11:]] + "\n"
    fiveMinsAndOlderDf = last10Points[last10Points.mTime < stoppedMovingTs - 5 * 60 * 1000]
    if fiveMinsAndOlderDf.shape[0] > 0:
        print "Distance from 5 mins ago = %s" % pf.calDistance(fiveMinsAndOlderDf.iloc[-1], lastPoint)
    print last10Points[["mLatitude", "mLongitude", "mAccuracy", "formatted_time", "distance"]]


final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437664503716}}, {'data.mTime': {'$lt': 1437665103721}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([], dtype='int64')
filtered list size went from (41, 28) to (41, 28)
last10Points.shape = (41, 30)
------------------------------2015-07-23 08:25:03

Last 11 distances are [118.6762795720348, 84.23454496180636, 70.83051254095994, 81.39357117721113, 82.04280206600234, 71.79787024559754, 71.79787024559754, 73.08927082979012, 0.0, 0.0, 0.0]

Distance from 5 mins ago = 118.676279572
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.391818 -122.085693     10.000 2015-07-23 08:16:14    0.000000
1   37.392049 -122.085186     15.000 2015-07-23 08:16:28   51.628776
2   37.392205 -122.085096     15.000 2015-07-23 08:16:33   19.027604
3   37.392421 -122.085028     15.000 2015-07-23 08:16:38   24.762287
4   37.392631 -122.084884     15.000 2015-07-23 08:16:43   26.661124
5   37.392849 -122.084782     15.000 2015-07-23 08:16:48   25.853830
6   37.392821 -122.084545     15.000 2015-07-23 08:16:53   21.185069
7   37.392581 -122.084233     10.000 2015-07-23 08:16:59   38.378851
8   37.392408 -122.083892     10.000 2015-07-23 08:17:05   35.708871
9   37.392234 -122.083633     10.000 2015-07-23 08:17:11   30.001125
10  37.392213 -122.083435     10.000 2015-07-23 08:17:16   17.631255
11  37.392154 -122.083191     10.000 2015-07-23 08:17:21   22.515285
12  37.392187 -122.082912     10.000 2015-07-23 08:17:26   24.941636
13  37.392384 -122.082715     10.000 2015-07-23 08:17:31   27.926736
14  37.392519 -122.082544     10.000 2015-07-23 08:17:36   21.282716
15  37.392750 -122.082379     10.000 2015-07-23 08:17:42   29.635015
16  37.392985 -122.082179     10.000 2015-07-23 08:17:48   31.477778
17  37.393203 -122.082067     10.000 2015-07-23 08:17:53   26.117249
18  37.393383 -122.081951     10.000 2015-07-23 08:17:59   22.547570
19  37.393246 -122.081706     10.000 2015-07-23 08:18:05   26.521981
20  37.393064 -122.081412     10.000 2015-07-23 08:18:11   32.892505
21  37.392925 -122.081122     10.000 2015-07-23 08:18:16   29.884730
22  37.392840 -122.080987     10.000 2015-07-23 08:18:21   15.251990
23  37.392819 -122.080906     10.000 2015-07-23 08:18:26    7.527845
24  37.393043 -122.080676     10.000 2015-07-23 08:18:31   32.202058
25  37.393309 -122.080537     10.000 2015-07-23 08:18:37   31.946947
26  37.393529 -122.080360     10.000 2015-07-23 08:18:42   29.113543
27  37.393724 -122.080169     10.000 2015-07-23 08:18:47   27.410507
28  37.393980 -122.080019     10.000 2015-07-23 08:18:53   31.384988
29  37.394279 -122.079977     31.500 2015-07-23 08:19:29   33.554116
30  37.394744 -122.077460     37.500 2015-07-23 08:19:59  228.244717
31  37.394538 -122.076939     72.000 2015-07-23 08:20:29   51.438463
32  37.394385 -122.076499     72.000 2015-07-23 08:20:59   42.444530
33  37.394233 -122.076296     31.500 2015-07-23 08:21:29   24.547374
34  37.394227 -122.076296     39.000 2015-07-23 08:21:59    0.669272
35  37.394520 -122.076743     40.500 2015-07-23 08:22:29   51.130052
36  37.394520 -122.076743     84.036 2015-07-23 08:22:58    0.000000
37  37.394438 -122.076654     57.000 2015-07-23 08:23:29   11.995061
38  37.394955 -122.076143     57.000 2015-07-23 08:23:59   73.089271
39  37.394955 -122.076143    105.915 2015-07-23 08:24:32    0.000000
40  37.394955 -122.076143    145.599 2015-07-23 08:24:58    0.000000
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437664572261}}, {'data.mTime': {'$lt': 1437665172266}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([41, 42], dtype='int64')
filtered list size went from (43, 28) to (41, 28)
last10Points.shape = (41, 30)
------------------------------2015-07-23 08:26:12

Last 11 distances are [118.6762795720348, 84.23454496180636, 70.83051254095994, 81.39357117721113, 82.04280206600234, 71.79787024559754, 71.79787024559754, 73.08927082979012, 0.0, 0.0, 0.0]

Distance from 5 mins ago = 70.830512541
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.391818 -122.085693     10.000 2015-07-23 08:16:14    0.000000
1   37.392049 -122.085186     15.000 2015-07-23 08:16:28   51.628776
2   37.392205 -122.085096     15.000 2015-07-23 08:16:33   19.027604
3   37.392421 -122.085028     15.000 2015-07-23 08:16:38   24.762287
4   37.392631 -122.084884     15.000 2015-07-23 08:16:43   26.661124
5   37.392849 -122.084782     15.000 2015-07-23 08:16:48   25.853830
6   37.392821 -122.084545     15.000 2015-07-23 08:16:53   21.185069
7   37.392581 -122.084233     10.000 2015-07-23 08:16:59   38.378851
8   37.392408 -122.083892     10.000 2015-07-23 08:17:05   35.708871
9   37.392234 -122.083633     10.000 2015-07-23 08:17:11   30.001125
10  37.392213 -122.083435     10.000 2015-07-23 08:17:16   17.631255
11  37.392154 -122.083191     10.000 2015-07-23 08:17:21   22.515285
12  37.392187 -122.082912     10.000 2015-07-23 08:17:26   24.941636
13  37.392384 -122.082715     10.000 2015-07-23 08:17:31   27.926736
14  37.392519 -122.082544     10.000 2015-07-23 08:17:36   21.282716
15  37.392750 -122.082379     10.000 2015-07-23 08:17:42   29.635015
16  37.392985 -122.082179     10.000 2015-07-23 08:17:48   31.477778
17  37.393203 -122.082067     10.000 2015-07-23 08:17:53   26.117249
18  37.393383 -122.081951     10.000 2015-07-23 08:17:59   22.547570
19  37.393246 -122.081706     10.000 2015-07-23 08:18:05   26.521981
20  37.393064 -122.081412     10.000 2015-07-23 08:18:11   32.892505
21  37.392925 -122.081122     10.000 2015-07-23 08:18:16   29.884730
22  37.392840 -122.080987     10.000 2015-07-23 08:18:21   15.251990
23  37.392819 -122.080906     10.000 2015-07-23 08:18:26    7.527845
24  37.393043 -122.080676     10.000 2015-07-23 08:18:31   32.202058
25  37.393309 -122.080537     10.000 2015-07-23 08:18:37   31.946947
26  37.393529 -122.080360     10.000 2015-07-23 08:18:42   29.113543
27  37.393724 -122.080169     10.000 2015-07-23 08:18:47   27.410507
28  37.393980 -122.080019     10.000 2015-07-23 08:18:53   31.384988
29  37.394279 -122.079977     31.500 2015-07-23 08:19:29   33.554116
30  37.394744 -122.077460     37.500 2015-07-23 08:19:59  228.244717
31  37.394538 -122.076939     72.000 2015-07-23 08:20:29   51.438463
32  37.394385 -122.076499     72.000 2015-07-23 08:20:59   42.444530
33  37.394233 -122.076296     31.500 2015-07-23 08:21:29   24.547374
34  37.394227 -122.076296     39.000 2015-07-23 08:21:59    0.669272
35  37.394520 -122.076743     40.500 2015-07-23 08:22:29   51.130052
36  37.394520 -122.076743     84.036 2015-07-23 08:22:58    0.000000
37  37.394438 -122.076654     57.000 2015-07-23 08:23:29   11.995061
38  37.394955 -122.076143     57.000 2015-07-23 08:23:59   73.089271
39  37.394955 -122.076143    105.915 2015-07-23 08:24:32    0.000000
40  37.394955 -122.076143    145.599 2015-07-23 08:24:58    0.000000
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437664579009}}, {'data.mTime': {'$lt': 1437665179014}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([40, 41, 42], dtype='int64')
filtered list size went from (44, 28) to (41, 28)
last10Points.shape = (41, 30)
------------------------------2015-07-23 08:26:19

Last 11 distances are [27.703923867873623, 14.740734766611789, 38.74867024633647, 39.185349370638406, 12.152503864197595, 12.152503864197595, 0.16915281655074366, 73.05802192863707, 73.05802192863707, 73.05802192863707, 0.0]

Distance from 5 mins ago = 14.7407347666
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.392049 -122.085186     15.000 2015-07-23 08:16:28    0.000000
1   37.392205 -122.085096     15.000 2015-07-23 08:16:33   19.027604
2   37.392421 -122.085028     15.000 2015-07-23 08:16:38   24.762287
3   37.392631 -122.084884     15.000 2015-07-23 08:16:43   26.661124
4   37.392849 -122.084782     15.000 2015-07-23 08:16:48   25.853830
5   37.392821 -122.084545     15.000 2015-07-23 08:16:53   21.185069
6   37.392581 -122.084233     10.000 2015-07-23 08:16:59   38.378851
7   37.392408 -122.083892     10.000 2015-07-23 08:17:05   35.708871
8   37.392234 -122.083633     10.000 2015-07-23 08:17:11   30.001125
9   37.392213 -122.083435     10.000 2015-07-23 08:17:16   17.631255
10  37.392154 -122.083191     10.000 2015-07-23 08:17:21   22.515285
11  37.392187 -122.082912     10.000 2015-07-23 08:17:26   24.941636
12  37.392384 -122.082715     10.000 2015-07-23 08:17:31   27.926736
13  37.392519 -122.082544     10.000 2015-07-23 08:17:36   21.282716
14  37.392750 -122.082379     10.000 2015-07-23 08:17:42   29.635015
15  37.392985 -122.082179     10.000 2015-07-23 08:17:48   31.477778
16  37.393203 -122.082067     10.000 2015-07-23 08:17:53   26.117249
17  37.393383 -122.081951     10.000 2015-07-23 08:17:59   22.547570
18  37.393246 -122.081706     10.000 2015-07-23 08:18:05   26.521981
19  37.393064 -122.081412     10.000 2015-07-23 08:18:11   32.892505
20  37.392925 -122.081122     10.000 2015-07-23 08:18:16   29.884730
21  37.392840 -122.080987     10.000 2015-07-23 08:18:21   15.251990
22  37.392819 -122.080906     10.000 2015-07-23 08:18:26    7.527845
23  37.393043 -122.080676     10.000 2015-07-23 08:18:31   32.202058
24  37.393309 -122.080537     10.000 2015-07-23 08:18:37   31.946947
25  37.393529 -122.080360     10.000 2015-07-23 08:18:42   29.113543
26  37.393724 -122.080169     10.000 2015-07-23 08:18:47   27.410507
27  37.393980 -122.080019     10.000 2015-07-23 08:18:53   31.384988
28  37.394279 -122.079977     31.500 2015-07-23 08:19:29   33.554116
29  37.394744 -122.077460     37.500 2015-07-23 08:19:59  228.244717
30  37.394538 -122.076939     72.000 2015-07-23 08:20:29   51.438463
31  37.394385 -122.076499     72.000 2015-07-23 08:20:59   42.444530
32  37.394233 -122.076296     31.500 2015-07-23 08:21:29   24.547374
33  37.394227 -122.076296     39.000 2015-07-23 08:21:59    0.669272
34  37.394520 -122.076743     40.500 2015-07-23 08:22:29   51.130052
35  37.394520 -122.076743     84.036 2015-07-23 08:22:58    0.000000
36  37.394438 -122.076654     57.000 2015-07-23 08:23:29   11.995061
37  37.394955 -122.076143     57.000 2015-07-23 08:23:59   73.089271
38  37.394955 -122.076143    105.915 2015-07-23 08:24:32    0.000000
39  37.394955 -122.076143    145.599 2015-07-23 08:24:58    0.000000
40  37.394437 -122.076652     40.500 2015-07-23 08:26:17   73.058022
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437664647405}}, {'data.mTime': {'$lt': 1437665247410}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([28, 29, 30, 32, 33], dtype='int64')
filtered list size went from (34, 28) to (29, 28)
last10Points.shape = (29, 30)
------------------------------2015-07-23 08:27:27

Last 11 distances are [27.703923867873623, 14.740734766611789, 38.74867024633647, 39.185349370638406, 12.152503864197595, 12.152503864197595, 0.16915281655074366, 73.05802192863707, 73.05802192863707, 73.05802192863707, 0.0]

Distance from 5 mins ago = 39.1853493706
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.392384 -122.082715     10.000 2015-07-23 08:17:31    0.000000
1   37.392519 -122.082544     10.000 2015-07-23 08:17:36   21.282716
2   37.392750 -122.082379     10.000 2015-07-23 08:17:42   29.635015
3   37.392985 -122.082179     10.000 2015-07-23 08:17:48   31.477778
4   37.393203 -122.082067     10.000 2015-07-23 08:17:53   26.117249
5   37.393383 -122.081951     10.000 2015-07-23 08:17:59   22.547570
6   37.393246 -122.081706     10.000 2015-07-23 08:18:05   26.521981
7   37.393064 -122.081412     10.000 2015-07-23 08:18:11   32.892505
8   37.392925 -122.081122     10.000 2015-07-23 08:18:16   29.884730
9   37.392840 -122.080987     10.000 2015-07-23 08:18:21   15.251990
10  37.392819 -122.080906     10.000 2015-07-23 08:18:26    7.527845
11  37.393043 -122.080676     10.000 2015-07-23 08:18:31   32.202058
12  37.393309 -122.080537     10.000 2015-07-23 08:18:37   31.946947
13  37.393529 -122.080360     10.000 2015-07-23 08:18:42   29.113543
14  37.393724 -122.080169     10.000 2015-07-23 08:18:47   27.410507
15  37.393980 -122.080019     10.000 2015-07-23 08:18:53   31.384988
16  37.394279 -122.079977     31.500 2015-07-23 08:19:29   33.554116
17  37.394744 -122.077460     37.500 2015-07-23 08:19:59  228.244717
18  37.394538 -122.076939     72.000 2015-07-23 08:20:29   51.438463
19  37.394385 -122.076499     72.000 2015-07-23 08:20:59   42.444530
20  37.394233 -122.076296     31.500 2015-07-23 08:21:29   24.547374
21  37.394227 -122.076296     39.000 2015-07-23 08:21:59    0.669272
22  37.394520 -122.076743     40.500 2015-07-23 08:22:29   51.130052
23  37.394520 -122.076743     84.036 2015-07-23 08:22:58    0.000000
24  37.394438 -122.076654     57.000 2015-07-23 08:23:29   11.995061
25  37.394955 -122.076143     57.000 2015-07-23 08:23:59   73.089271
26  37.394955 -122.076143    105.915 2015-07-23 08:24:32    0.000000
27  37.394955 -122.076143    145.599 2015-07-23 08:24:58    0.000000
28  37.394437 -122.076652     40.500 2015-07-23 08:26:17   73.058022
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437667309507}}, {'data.mTime': {'$lt': 1437667909512}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([0, 1, 3, 4, 7, 8, 9], dtype='int64')
filtered list size went from (19, 28) to (12, 28)
last10Points.shape = (12, 30)
------------------------------2015-07-23 09:11:49

Last 11 distances are [4666.073662737453, 3783.2246162554193, 6.135694200302091, 12.523064129836115, 19.9631265012976, 14.926814850122152, 11.20498772302575, 7.4504322783523955, 6.64449574082115, 12.535656012216005, 0.0]

Distance from 5 mins ago = 3783.22461626
    mLatitude  mLongitude  mAccuracy      formatted_time     distance
0   37.572180 -122.328022       40.5 2015-07-23 09:03:15     0.000000
1   37.578277 -122.341299       40.5 2015-07-23 09:04:45  1352.357938
2   37.582777 -122.349595       60.0 2015-07-23 09:05:16   885.880893
3   37.599277 -122.387133       40.5 2015-07-23 09:07:46  3782.211270
4   37.599360 -122.386973       42.0 2015-07-23 09:08:16    16.869221
5   37.599278 -122.387327       37.5 2015-07-23 09:08:46    32.486173
6   37.599286 -122.386949       40.5 2015-07-23 09:09:16    33.324121
7   37.599325 -122.386983       36.0 2015-07-23 09:09:46     5.218907
8   37.599277 -122.387164       39.0 2015-07-23 09:10:16    16.861408
9   37.599277 -122.387147       37.5 2015-07-23 09:10:46     1.508510
10  37.599361 -122.386973       37.5 2015-07-23 09:11:16    17.944979
11  37.599329 -122.387110       39.0 2015-07-23 09:11:46    12.535656
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437672263987}}, {'data.mTime': {'$lt': 1437672863992}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([], dtype='int64')
filtered list size went from (20, 28) to (20, 28)
last10Points.shape = (20, 30)
------------------------------2015-07-23 10:34:23

Last 11 distances are [46.1427209063442, 44.369576728958535, 25.217315106696446, 52.427568812026955, 44.291444878407034, 3.4804454741413458, 6.076633512274382, 3.4319446094983417, 3.460834766313353, 1.1680744782924628, 0.0]

Distance from 5 mins ago = 46.1427209063
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.873661 -122.261259     96.076 2015-07-23 10:24:47    0.000000
1   37.873787 -122.261458     63.000 2015-07-23 10:25:18   22.384571
2   37.873787 -122.261458    106.540 2015-07-23 10:25:47    0.000000
3   37.875204 -122.259827     36.000 2015-07-23 10:26:18  212.895732
4   37.875029 -122.260242     42.000 2015-07-23 10:26:48   41.320951
5   37.874964 -122.260372     42.000 2015-07-23 10:27:18   13.526186
6   37.874963 -122.260114     45.000 2015-07-23 10:27:48   22.715488
7   37.874976 -122.259838     30.000 2015-07-23 10:28:18   24.249317
8   37.874884 -122.259319     30.000 2015-07-23 10:28:48   46.682106
9   37.874927 -122.259161     30.000 2015-07-23 10:29:18   14.687320
10  37.874901 -122.259107     48.000 2015-07-23 10:29:52    5.576093
11  37.874995 -122.258912     30.000 2015-07-23 10:30:12   19.979129
12  37.875517 -122.258328     30.000 2015-07-23 10:30:34   77.505431
13  37.875512 -122.258469     37.500 2015-07-23 10:31:20   12.379471
14  37.875146 -122.258741     24.692 2015-07-23 10:31:52   47.248011
15  37.875123 -122.258747     30.000 2015-07-23 10:32:22    2.621330
16  37.875148 -122.258756     30.000 2015-07-23 10:32:52    3.000682
17  37.875148 -122.258755     30.000 2015-07-23 10:33:22    0.145458
18  37.875188 -122.258741     40.500 2015-07-23 10:33:52    4.586012
19  37.875177 -122.258741     31.500 2015-07-23 10:34:22    1.168074
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437686709770}}, {'data.mTime': {'$lt': 1437687309775}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([0], dtype='int64')
filtered list size went from (10, 28) to (9, 28)
last10Points.shape = (9, 30)
------------------------------2015-07-23 14:35:09

Last 11 distances are [77.82196208280342, 71.14092962257278, 70.26988841203128, 69.41036990346805, 17.519212305155744, 13.81208124342218, 17.144232378270313, 17.144232378270313, 0.0]

   mLatitude  mLongitude  mAccuracy      formatted_time   distance
0  37.875735 -122.258701     27.000 2015-07-23 14:31:07   0.000000
1  37.875652 -122.258574     30.000 2015-07-23 14:31:37  14.347429
2  37.875659 -122.258650     31.500 2015-07-23 14:32:07   6.644835
3  37.875638 -122.258582     30.000 2015-07-23 14:32:37   6.372282
4  37.875134 -122.258649     20.455 2015-07-23 14:33:07  56.315846
5  37.875096 -122.258669     30.000 2015-07-23 14:33:37   4.579509
6  37.875127 -122.258648     20.820 2015-07-23 14:34:06   3.912178
7  37.875127 -122.258648     66.984 2015-07-23 14:34:37   0.000000
8  37.875040 -122.258809     30.000 2015-07-23 14:35:06  17.144232
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688281184}}, {'data.mTime': {'$lt': 1437688881189}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], dtype='int64')
filtered list size went from (19, 28) to (2, 28)
last10Points.shape = (2, 30)
------------------------------2015-07-23 15:01:21

Last 11 distances are [650.2681463487453, 0.0]

Distance from 5 mins ago = 0.0
   mLatitude  mLongitude  mAccuracy      formatted_time    distance
0  37.847034 -122.271473         36 2015-07-23 14:51:44    0.000000
1  37.841296 -122.270044         42 2015-07-23 14:52:14  650.268146
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688294926}}, {'data.mTime': {'$lt': 1437688894931}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], dtype='int64')
filtered list size went from (21, 28) to (2, 28)
last10Points.shape = (2, 30)
------------------------------2015-07-23 15:01:34

Last 11 distances are [650.2681463487453, 0.0]

Distance from 5 mins ago = 0.0
   mLatitude  mLongitude  mAccuracy      formatted_time    distance
0  37.847034 -122.271473         36 2015-07-23 14:51:44    0.000000
1  37.841296 -122.270044         42 2015-07-23 14:52:14  650.268146
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688307259}}, {'data.mTime': {'$lt': 1437688907264}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21], dtype='int64')
filtered list size went from (22, 28) to (1, 28)
last10Points.shape = (1, 30)
------------------------------2015-07-23 15:01:47

Last 11 distances are [0.0]

Distance from 5 mins ago = 0.0
   mLatitude  mLongitude  mAccuracy      formatted_time  distance
0  37.841296 -122.270044         42 2015-07-23 14:52:14         0
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688320266}}, {'data.mTime': {'$lt': 1437688920271}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23], dtype='int64')
filtered list size went from (24, 28) to (1, 28)
last10Points.shape = (1, 30)
------------------------------2015-07-23 15:02:00

Last 11 distances are [0.0]

Distance from 5 mins ago = 0.0
   mLatitude  mLongitude  mAccuracy      formatted_time  distance
0  37.841296 -122.270044         42 2015-07-23 14:52:14         0
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688332772}}, {'data.mTime': {'$lt': 1437688932777}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], dtype='int64')
filtered list size went from (26, 28) to (1, 28)
last10Points.shape = (1, 30)
------------------------------2015-07-23 15:02:12

Last 11 distances are [0.0]

Distance from 5 mins ago = 0.0
   mLatitude  mLongitude  mAccuracy      formatted_time  distance
0  37.841296 -122.270044         42 2015-07-23 14:52:14         0
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688345641}}, {'data.mTime': {'$lt': 1437688945646}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], dtype='int64')
filtered list size went from (27, 28) to (0, 0)
last10Points.shape = (1, 2)
No points found in the past 10 minutes, skipping!
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688358129}}, {'data.mTime': {'$lt': 1437688958134}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28], dtype='int64')
filtered list size went from (29, 28) to (0, 0)
last10Points.shape = (1, 2)
No points found in the past 10 minutes, skipping!
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437688371102}}, {'data.mTime': {'$lt': 1437688971107}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], dtype='int64')
filtered list size went from (30, 28) to (0, 0)
last10Points.shape = (1, 2)
No points found in the past 10 minutes, skipping!
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437690274718}}, {'data.mTime': {'$lt': 1437690874723}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([14, 15, 17], dtype='int64')
filtered list size went from (20, 28) to (17, 28)
last10Points.shape = (17, 30)
------------------------------2015-07-23 15:34:34

Last 11 distances are [66.90580329360536, 49.7982147118132, 48.77036451522202, 147.30859239757, 64.84831838538051, 43.43183320513154, 46.29287442003442, 24.43991415117892, 88.29700713025164, 46.107092251161895, 0.0]

Distance from 5 mins ago = 147.308592398
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.781182 -122.388901     39.000 2015-07-23 15:25:00    0.000000
1   37.780413 -122.389542     39.000 2015-07-23 15:25:31  102.354796
2   37.779475 -122.390619     39.000 2015-07-23 15:26:01  140.873616
3   37.778525 -122.391698     40.500 2015-07-23 15:26:31  141.942726
4   37.777691 -122.392420     76.499 2015-07-23 15:27:01  112.344641
5   37.776557 -122.393764     57.983 2015-07-23 15:27:31  172.820150
6   37.776500 -122.394330     37.500 2015-07-23 15:28:01   50.199713
7   37.776295 -122.394342     36.000 2015-07-23 15:28:31   22.797539
8   37.776456 -122.394731     48.000 2015-07-23 15:29:01   38.605423
9   37.777336 -122.394977     95.998 2015-07-23 15:29:31  100.237156
10  37.776590 -122.394944     36.000 2015-07-23 15:30:01   83.016017
11  37.776381 -122.394599     38.555 2015-07-23 15:30:31   38.195028
12  37.776417 -122.394631     45.000 2015-07-23 15:31:01    4.893860
13  37.776230 -122.394706     57.000 2015-07-23 15:31:31   21.853029
14  37.775398 -122.395414     57.000 2015-07-23 15:33:01  111.460477
15  37.776370 -122.394509     40.500 2015-07-23 15:34:01  134.234484
16  37.776020 -122.394789     79.500 2015-07-23 15:34:23   46.107092
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437695298818}}, {'data.mTime': {'$lt': 1437695898823}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([], dtype='int64')
filtered list size went from (10, 28) to (10, 28)
last10Points.shape = (10, 30)
------------------------------2015-07-23 16:58:18

Last 11 distances are [27.99758528167523, 16.79362479737564, 5.415229917520953, 30.154250627153793, 40.80022591524176, 27.546012414466198, 8.430091377052733, 20.268896989511077, 1.7997452155862284, 0.0]

   mLatitude  mLongitude  mAccuracy      formatted_time   distance
0  37.391677 -122.080259       42.0 2015-07-23 16:53:47   0.000000
1  37.391779 -122.080211       42.0 2015-07-23 16:54:17  12.096365
2  37.391916 -122.080030       48.0 2015-07-23 16:54:47  22.128798
3  37.391683 -122.080304       36.0 2015-07-23 16:55:17  35.543754
4  37.391512 -122.080102       60.0 2015-07-23 16:55:47  26.111304
5  37.391644 -122.080172       45.0 2015-07-23 16:56:17  15.978563
6  37.391927 -122.079995       39.0 2015-07-23 16:56:47  35.103273
7  37.391820 -122.080285       58.5 2015-07-23 16:57:17  28.256502
8  37.391893 -122.080060       40.5 2015-07-23 16:57:47  21.433690
9  37.391877 -122.080067       40.5 2015-07-23 16:58:17   1.799745
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437705250247}}, {'data.mTime': {'$lt': 1437705850252}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([0], dtype='int64')
filtered list size went from (10, 28) to (9, 28)
last10Points.shape = (9, 30)
------------------------------2015-07-23 19:44:10

Last 11 distances are [29.21305158215058, 8.996936800460348, 2.3034595730894853, 14.089558393981251, 13.724741189826789, 22.510730994405407, 11.366972464552225, 27.634075413157937, 0.0]

   mLatitude  mLongitude  mAccuracy      formatted_time   distance
0  37.391783 -122.079946       64.5 2015-07-23 19:40:08   0.000000
1  37.391982 -122.079956       36.0 2015-07-23 19:40:38  22.191297
2  37.392056 -122.080041       61.5 2015-07-23 19:41:08  11.081768
3  37.391913 -122.079994       45.0 2015-07-23 19:41:38  16.382116
4  37.392160 -122.080035       39.0 2015-07-23 19:42:08  27.650161
5  37.392235 -122.079980       40.5 2015-07-23 19:42:38   9.646047
6  37.392118 -122.079954       37.5 2015-07-23 19:43:08  13.201609
7  37.391800 -122.080128       48.0 2015-07-23 19:43:39  38.539901
8  37.392036 -122.080032       45.0 2015-07-23 19:44:09  27.634075
final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437711067946}}, {'data.mTime': {'$lt': 1437711667951}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 
filtering points Int64Index([0], dtype='int64')
filtered list size went from (21, 28) to (20, 28)
last10Points.shape = (20, 30)
------------------------------2015-07-23 21:21:07

Last 11 distances are [273.843025373454, 6.970236333505402, 7.236104810049376, 9.857435968209971, 2.261419607244882, 2.240698576693022, 2.39332398446444, 2.669879772245125, 0.0, 3.734748707234379, 0.0]

Distance from 5 mins ago = 273.843025373
    mLatitude  mLongitude  mAccuracy      formatted_time    distance
0   37.391201 -122.084051     48.000 2015-07-23 21:11:50    0.000000
1   37.392160 -122.085416     45.000 2015-07-23 21:12:21  161.000293
2   37.391869 -122.085717     69.992 2015-07-23 21:12:51   41.811788
3   37.390920 -122.086262     31.500 2015-07-23 21:13:21  116.003200
4   37.390920 -122.086243     37.500 2015-07-23 21:13:51    1.696272
5   37.390929 -122.086255     37.500 2015-07-23 21:14:21    1.481457
6   37.390928 -122.086256     37.500 2015-07-23 21:14:51    0.094172
7   37.390913 -122.086291     30.000 2015-07-23 21:15:21    3.505363
8   37.390911 -122.086291     21.213 2015-07-23 21:15:30    0.211455
9   37.388774 -122.087694     37.500 2015-07-23 21:16:05  268.067948
10  37.390899 -122.086289     40.500 2015-07-23 21:16:35  266.934002
11  37.390897 -122.086291     37.500 2015-07-23 21:17:05    0.287073
12  37.390876 -122.086304     34.500 2015-07-23 21:17:35    2.630010
13  37.390938 -122.086258     31.500 2015-07-23 21:18:06    8.006660
14  37.390938 -122.086259     33.000 2015-07-23 21:18:36    0.071546
15  37.390937 -122.086259     52.500 2015-07-23 21:19:06    0.156672
16  37.390934 -122.086259     33.000 2015-07-23 21:19:36    0.277987
17  37.390958 -122.086262     55.500 2015-07-23 21:20:06    2.669880
18  37.390925 -122.086253     30.000 2015-07-23 21:20:36    3.734749
19  37.390958 -122.086262     55.500 2015-07-23 21:21:06    3.734749

Our algorithm:

  1. Remove all low accuracy points
  2. Remove all points that are identical to the previous one (distance == 0 meters)
  3. Get all points in the past 5 mins, and the last 10 points
  4. Pick the set with the oldest point
  5. See if all points in the set are within 100m of the last point
  6. If so, end trip, otherwise continue trip

In [73]:
my_points_time_df_23 = lq.get_plottable_df(myUUID, "time", get_jul_dt(23), get_jul_dt(24))


final query = {'metadata.key': 'background/location', '$and': [{'data.mTime': {'$gt': 1437638400000.0}}, {'data.mTime': {'$lt': 1437724800000.0}}], 'user_id': UUID('0763de67-f61e-3f5d-90e7-518e69793954'), 'metadata.filter': 'time'} 

In [76]:
filtered_time_df_23 = ls.add_speed(ls.filter_accuracy(my_points_time_df_23))


filtering points Int64Index([41, 42, 43, 45, 46, 47, 48, 49, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 67, 68, 70, 76, 81, 82, 83, 84, 91, 96, 101, 102, 105, 106, 109, 110, 111, 113, 114, 117, 118, 119, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 160, 161, 162, 165, 166, 167, 168, 169, 170, 171, 172, 173, 194, 217, 232, 233, 249, 250, 251, 252, 253, 254, 255, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, ...], dtype='int64')
filtered list size went from (504, 28) to (324, 28)

In [105]:
filtered_nonzero_time_df_23 = filtered_time_df_23[filtered_time_df_23.distance != 0].reset_index(drop=True)

In [106]:
filtered_nonzero_time_df_23.shape


Out[106]:
(290, 30)

In [107]:
filtered_nonzero_time_df_23.head()


Out[107]:
filter formatted_time key mAccuracy mAltitude mBearing mDistance mElapsedRealtimeNanos mHasAccuracy mHasAltitude ... mProvider mResults mSpeed mTime platform read_ts type write_ts distance speed
0 time 2015-07-23 08:16:28 background/location 15 -8.700012 44 0 316729919714897 True True ... fused [0, 0] 5.19165 1437664588217 android 0 message 1437664589086 51.628776 3.685137
1 time 2015-07-23 08:16:33 background/location 15 -9.899994 17 0 316734929541557 True True ... fused [0, 0] 4.31595 1437664593221 android 0 message 1437664593503 19.027604 3.802479
2 time 2015-07-23 08:16:38 background/location 15 -10.600006 22 0 316739941962211 True True ... fused [0, 0] 4.56615 1437664598234 android 0 message 1437664598483 24.762287 4.939614
3 time 2015-07-23 08:16:43 background/location 15 -11.100006 35 0 316744957739799 True True ... fused [0, 0] 5.25420 1437664603247 android 0 message 1437664603535 26.661124 5.318397
4 time 2015-07-23 08:16:48 background/location 15 -10.500000 33 0 316749968573539 True True ... fused [0, 0] 5.81715 1437664608253 android 0 message 1437664608525 25.853830 5.164569

5 rows × 30 columns


In [108]:
filtered_nonzero_time_df_23.tail()


Out[108]:
filter formatted_time key mAccuracy mAltitude mBearing mDistance mElapsedRealtimeNanos mHasAccuracy mHasAltitude ... mProvider mResults mSpeed mTime platform read_ts type write_ts distance speed
285 time 2015-07-23 21:19:06 background/location 52.5 0 0 0 363687939000000 True False ... fused [0, 0] 0 1437711546073 android 0 message 1437711546499 0.156672 0.005215
286 time 2015-07-23 21:19:36 background/location 33.0 0 0 0 363717953000000 True False ... fused [0, 0] 0 1437711576087 android 0 message 1437711576637 0.277987 0.009262
287 time 2015-07-23 21:20:06 background/location 55.5 0 0 0 363748127000000 True False ... fused [0, 0] 0 1437711606261 android 0 message 1437711606884 2.669880 0.088483
288 time 2015-07-23 21:20:36 background/location 30.0 0 0 0 363778173000000 True False ... fused [0, 0] 0 1437711636307 android 0 message 1437711636718 3.734749 0.124301
289 time 2015-07-23 21:21:06 background/location 55.5 0 0 0 363808249000000 True False ... fused [0, 0] 0 1437711666383 android 0 message 1437711667109 3.734749 0.124177

5 rows × 30 columns


In [109]:
import numpy as np

In [127]:
segmentation_points = []
last_trip_end_point = None
curr_trip_start_point = None
just_ended = True
for idx, row in filtered_nonzero_time_df_23.iterrows():
    currPoint = ad.AttrDict(row)
    currPoint.update({"idx": idx})
    print "-" * 30 + str(currPoint.formatted_time) + "-" * 30
    if curr_trip_start_point is None:
        segmentation_points.append(currPoint)
    if just_ended:
        curr_trip_start_point = currPoint
        just_ended = False
        
    last5MinsPoints_df = filtered_nonzero_time_df_23[np.logical_and(
                                                            np.logical_and(
                                                                    filtered_nonzero_time_df_23.mTime > currPoint.mTime - 5 * 60 * 1000,
                                                                    filtered_nonzero_time_df_23.mTime < currPoint.mTime),
                                                            filtered_nonzero_time_df_23.mTime >= curr_trip_start_point.mTime)]
    # Using .loc here causes problems if we have filtered out some points and so the index is non-consecutive.
    # Using .iloc just ends up including points after this one.
    # So we reset_index upstream and use it here.
    last10Points_df = filtered_nonzero_time_df_23.iloc[max(idx-10, curr_trip_start_point.idx):idx]
    distanceToLast = lambda(row): pf.calDistance(ad.AttrDict(row), currPoint)
    last5MinsDistances = last5MinsPoints_df.apply(distanceToLast, axis=1)
    print "last5MinsDistances = %s with length %d" % (last5MinsDistances.as_matrix(), len(last5MinsDistances))
    last10PointsDistances = last10Points_df.apply(distanceToLast, axis=1)
    print "last10PointsDistances = %s with length %d, shape %s" % (last10PointsDistances.as_matrix(),
                                                                   len(last10PointsDistances),
                                                                   last10PointsDistances.shape)
    
    print("len(last10PointsDistances) = %d, len(last5MinsDistances) = %d" %
          (len(last10PointsDistances), len(last5MinsDistances)))
    if (len(last10PointsDistances) < 10 or len(last5MinsDistances) == 0):
        print "Too few points to make a decision, continuing"
    else:
        print("last5MinsDistances.max() = %s, last10PointsDistance.max() = %s" %
          (last5MinsDistances.max(), last10PointsDistances.max()))
        if (last5MinsDistances.max() < 100 and last10PointsDistances.max() < 100):
            last_trip_end_index = min(last5MinsPoints_df.index.min(),
                                   last10Points_df.index.min())
            last_trip_end_point = filtered_nonzero_time_df_23.loc[last_trip_end_index]
            segmentation_points.append(last_trip_end_point)
            print "Found trip end at %s" % str(pydt.datetime.fromtimestamp(last_trip_end_point.mTime/1000))
            just_ended = True


------------------------------2015-07-23 08:16:28------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [] with length 0, shape (0, 30)
len(last10PointsDistances) = 0, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-07-23 08:16:33------------------------------
last5MinsDistances = [ 19.02760439] with length 1
last10PointsDistances = [ 19.02760439] with length 1, shape (1,)
len(last10PointsDistances) = 1, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-07-23 08:16:38------------------------------
last5MinsDistances = [ 43.60993261  24.76228677] with length 2
last10PointsDistances = [ 43.60993261  24.76228677] with length 2, shape (2,)
len(last10PointsDistances) = 2, len(last5MinsDistances) = 2
Too few points to make a decision, continuing
------------------------------2015-07-23 08:16:43------------------------------
last5MinsDistances = [ 70.0333474   51.02581454  26.66112448] with length 3
last10PointsDistances = [ 70.0333474   51.02581454  26.66112448] with length 3, shape (3,)
len(last10PointsDistances) = 3, len(last5MinsDistances) = 3
Too few points to make a decision, continuing
------------------------------2015-07-23 08:16:48------------------------------
last5MinsDistances = [ 95.87560802  76.87607778  52.38584852  25.85383035] with length 4
last10PointsDistances = [ 95.87560802  76.87607778  52.38584852  25.85383035] with length 4, shape (4,)
len(last10PointsDistances) = 4, len(last5MinsDistances) = 4
Too few points to make a decision, continuing
------------------------------2015-07-23 08:16:53------------------------------
last5MinsDistances = [ 102.88158807   84.12626911   61.69844579   36.66576725   21.1850687 ] with length 5
last10PointsDistances = [ 102.88158807   84.12626911   61.69844579   36.66576725   21.1850687 ] with length 5, shape (5,)
len(last10PointsDistances) = 5, len(last5MinsDistances) = 5
Too few points to make a decision, continuing
------------------------------2015-07-23 08:16:59------------------------------
last5MinsDistances = [ 102.89243889   86.98842547   72.43138776   57.77745268   56.93822846
   38.3788508 ] with length 6
last10PointsDistances = [ 102.89243889   86.98842547   72.43138776   57.77745268   56.93822846
   38.3788508 ] with length 6, shape (6,)
len(last10PointsDistances) = 6, len(last5MinsDistances) = 6
Too few points to make a decision, continuing
------------------------------2015-07-23 08:17:05------------------------------
last5MinsDistances = [ 121.1308706   108.79656428  100.34992648   91.07440474   92.64483765
   73.70085262   35.70887122] with length 7
last10PointsDistances = [ 121.1308706   108.79656428  100.34992648   91.07440474   92.64483765
   73.70085262   35.70887122] with length 7, shape (7,)
len(last10PointsDistances) = 7, len(last5MinsDistances) = 7
Too few points to make a decision, continuing
------------------------------2015-07-23 08:17:11------------------------------
last5MinsDistances = [ 138.75332053  129.32344312  124.94994932  119.02072719  122.40357646
  103.69140878   65.55595879   30.00112492] with length 8
last10PointsDistances = [ 138.75332053  129.32344312  124.94994932  119.02072719  122.40357646
  103.69140878   65.55595879   30.00112492] with length 8, shape (8,)
len(last10PointsDistances) = 8, len(last5MinsDistances) = 8
Too few points to make a decision, continuing
------------------------------2015-07-23 08:17:16------------------------------
last5MinsDistances = [ 155.76536049  146.75991403  142.57255464  136.18505452  138.42513877
  119.09587198   81.49819311   45.84090741   17.6312554 ] with length 9
last10PointsDistances = [ 155.76536049  146.75991403  142.57255464  136.18505452  138.42513877
  119.09587198   81.49819311   45.84090741   17.6312554 ] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 9
Too few points to make a decision, continuing
------------------------------2015-07-23 08:17:21------------------------------
last5MinsDistances = [ 176.62119709  168.39064172  164.91635041  158.67304609  160.37966073
  140.71395929  103.54643737   68.05766811   40.01654341   22.5152849 ] with length 10
last10PointsDistances = [ 176.62119709  168.39064172  164.91635041  158.67304609  160.37966073
  140.71395929  103.54643737   68.05766811   40.01654341   22.5152849 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
last5MinsDistances.max() = 176.621197093, last10PointsDistance.max() = 176.621197093
------------------------------2015-07-23 08:17:26------------------------------
last5MinsDistances = [ 201.48321498  192.96165947  188.67013823  181.03443861  180.80657402
  160.49871826  124.59865404   89.9600532    63.87736921   46.28002104
   24.94163603] with length 11
last10PointsDistances = [ 192.96165947  188.67013823  181.03443861  180.80657402  160.49871826
  124.59865404   89.9600532    63.87736921   46.28002104   24.94163603] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 11
last5MinsDistances.max() = 201.483214984, last10PointsDistance.max() = 192.96165947
------------------------------2015-07-23 08:17:31------------------------------
last5MinsDistances = [ 221.48772875  211.33932996  204.37163836  193.59562941  189.803563
  168.81578632  135.902305    104.02608911   82.80995875   66.41951143
   49.25761847   27.92673617] with length 12
last10PointsDistances = [ 204.37163836  193.59562941  189.803563    168.81578632  135.902305
  104.02608911   82.80995875   66.41951143   49.25761847   27.92673617] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 12
last5MinsDistances.max() = 221.487728753, last10PointsDistance.max() = 204.371638357
------------------------------2015-07-23 08:17:36------------------------------
last5MinsDistances = [ 239.20407769  228.18310732  219.69862514  207.10424852  201.09458007
  179.92518351  149.38146869  119.71501944  101.28949526   85.76922687
   70.12544056   49.13126516   21.28271568] with length 13
last10PointsDistances = [ 207.10424852  201.09458007  179.92518351  149.38146869  119.71501944
  101.28949526   85.76922687   70.12544056   49.13126516   21.28271568] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 13
last5MinsDistances.max() = 239.204077685, last10PointsDistance.max() = 207.10424852
------------------------------2015-07-23 08:17:42------------------------------
last5MinsDistances = [ 259.99870482  247.63778629  236.87284597  221.70583299  212.57260099
  191.49552599  164.89110283  138.97994456  124.81107797  110.84186139
   97.76163969   78.36116125   50.4533177    29.63501549] with length 14
last10PointsDistances = [ 212.57260099  191.49552599  164.89110283  138.97994456  124.81107797
  110.84186139   97.76163969   78.36116125   50.4533177    29.63501549] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 14
last5MinsDistances.max() = 259.998704824, last10PointsDistance.max() = 212.57260099
------------------------------2015-07-23 08:17:48------------------------------
last5MinsDistances = [ 285.31448547  271.93322846  259.3567455   242.1574421   230.41740019
  209.75935967  186.9261723   164.32955643  153.20726834  140.30924483
  128.61053155  109.81004645   81.91963094   61.06392791   31.4777784 ] with length 15
last10PointsDistances = [ 209.75935967  186.9261723   164.32955643  153.20726834  140.30924483
  128.61053155  109.81004645   81.91963094   61.06392791   31.4777784 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 15
last5MinsDistances.max() = 285.314485472, last10PointsDistance.max() = 209.759359675
------------------------------2015-07-23 08:17:53------------------------------
last5MinsDistances = [ 303.90507862  289.66992591  275.58304404  256.78014994  242.97771665
  222.89552023  203.40990076  183.76876257  175.29213102  163.433422
  153.15716585  135.30235005  107.51999051   86.92104386   57.28795525
   26.1172489 ] with length 16
last10PointsDistances = [ 203.40990076  183.76876257  175.29213102  163.433422    153.15716585
  135.30235005  107.51999051   86.92104386   57.28795525   26.1172489 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 16
last5MinsDistances.max() = 303.905078623, last10PointsDistance.max() = 203.409900759
------------------------------2015-07-23 08:17:59------------------------------
last5MinsDistances = [ 321.98794468  307.195912    292.09293301  272.22483259  257.0029875
  237.46407404  220.43189942  202.81883816  195.9622864   184.71461212
  175.17677656  157.73076087  129.99612499  109.45932983   79.82944467
   48.62003881   22.54756964] with length 17
last10PointsDistances = [ 202.81883816  195.9622864   184.71461212  175.17677656  157.73076087
  129.99612499  109.45932983   79.82944467   48.62003881   22.54756964] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 17
last5MinsDistances.max() = 321.987944676, last10PointsDistance.max() = 202.818838158
------------------------------2015-07-23 08:18:05------------------------------
last5MinsDistances = [ 335.02123998  321.11722522  307.46641488  288.9447098   275.28612736
  255.18105364  235.1758829   214.38506477  204.06309286  191.12992539
  178.7840093   158.74997965  130.88664285  109.62381722   81.02238831
   50.87233612   32.31101149   26.52198054] with length 18
last10PointsDistances = [ 204.06309286  191.12992539  178.7840093   158.74997965  130.88664285
  109.62381722   81.02238831   50.87233612   32.31101149   26.52198054] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 18
last5MinsDistances.max() = 335.021239984, last10PointsDistance.max() = 204.063092863
------------------------------2015-07-23 08:18:11------------------------------
last5MinsDistances = [ 352.05099891  339.26569741  327.37278724  310.50128963  298.6845336
  278.08730738  254.97789609  230.92880275  216.88060772  202.29471434
  187.00833952  164.55935993  137.7741991   116.99475588   92.28735677
   68.37429335   59.94725891   59.3990737    32.89250475] with length 19
last10PointsDistances = [ 202.29471434  187.00833952  164.55935993  137.7741991   116.99475588
   92.28735677   68.37429335   59.94725891   59.3990737    32.89250475] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 19
last5MinsDistances.max() = 352.050998911, last10PointsDistance.max() = 202.294714343
------------------------------2015-07-23 08:18:16------------------------------
last5MinsDistances = [ 372.03363923  360.13610775  349.57218103  333.9352933   323.42083289
  302.57678116  277.48743846  251.35619812  234.77431752  219.17643673
  201.94687122  178.17023176  153.05990636  133.5072218   112.7115663
   93.62242814   89.03017671   89.19194587   62.67083858   29.88472972] with length 20
last10PointsDistances = [ 201.94687122  178.17023176  153.05990636  133.5072218   112.7115663
   93.62242814   89.03017671   89.19194587   62.67083858   29.88472972] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 20
last5MinsDistances.max() = 372.033639226, last10PointsDistance.max() = 201.94687122
------------------------------2015-07-23 08:18:21------------------------------
last5MinsDistances = [ 381.2746282   369.86157853  360.01483141  345.05636968  335.25555071
  314.30607559  288.21866518  261.08881876  243.29354417  227.26445897
  209.17551929  184.9290994   160.86735732  142.12329374  123.36809385
  106.55681075  103.62831967  104.41723407   77.89536872   45.05401897
   15.25199015] with length 21
last10PointsDistances = [ 184.9290994   160.86735732  142.12329374  123.36809385  106.55681075
  103.62831967  104.41723407   77.89536872   45.05401897   15.25199015] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 21
last5MinsDistances.max() = 381.274628202, last10PointsDistance.max() = 184.929099404
------------------------------2015-07-23 08:18:26------------------------------
last5MinsDistances = [ 387.68918238  376.42983993  366.79781934  352.0291957   342.40911844
  321.43736629  295.09798173  267.69084292  249.52637213  233.36689217
  215.00352265  190.62226304  166.94772287  148.4871715   130.32347597
  113.98160635  111.13578462  111.64486676   85.12788173   52.35928682
   22.47573517    7.52784548] with length 22
last10PointsDistances = [ 166.94772287  148.4871715   130.32347597  113.98160635  111.13578462
  111.64486676   85.12788173   52.35928682   22.47573517    7.52784548] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 22
last5MinsDistances.max() = 387.689182382, last10PointsDistance.max() = 166.947722867
------------------------------2015-07-23 08:18:31------------------------------
last5MinsDistances = [ 413.48537278  401.47200029  390.6076542   374.52716381  363.33522961
  342.6300301   318.39520771  292.72077509  276.28330634  260.64722751
  243.22190071  219.26747823  194.45917955  175.00957058  153.89027433
  132.9295686   124.17823615  118.79850304   93.69553772   65.00904074
   41.51157436   35.55205303   32.20205757] with length 23
last10PointsDistances = [ 175.00957058  153.89027433  132.9295686   124.17823615  118.79850304
   93.69553772   65.00904074   41.51157436   35.55205303   32.20205757] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 23
last5MinsDistances.max() = 413.485372782, last10PointsDistance.max() = 175.009570584
------------------------------2015-07-23 08:18:37------------------------------
last5MinsDistances = [ 433.91756162  421.04528808  408.78899414  391.29299003  378.4195516
  358.12575286  336.35847824  312.79133586  298.44604078  283.52154796
  267.32618626  244.04554899  218.12835496  197.83501639  174.10580923
  149.43231255  135.68819539  125.1718862   103.45792316   81.87131689
   66.96110126   65.50746031   63.48423605   31.94694666] with length 24
last10PointsDistances = [ 174.10580923  149.43231255  135.68819539  125.1718862   103.45792316
   81.87131689   66.96110126   65.50746031   63.48423605   31.94694666] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 24
last5MinsDistances.max() = 433.917561621, last10PointsDistance.max() = 174.105809235
------------------------------2015-07-23 08:18:42------------------------------
last5MinsDistances = [ 457.0495388   443.6121162   430.41051271  411.95471086  397.9026145
  377.98675716  358.05603711  336.00442723  323.05505867  308.61859402
  293.2060139   270.38174268  243.94868543  223.29372553  198.27068943
  171.74448601  155.18355188  141.53395775  123.02827101  106.33857862
   95.09413299   94.55392313   92.58824824   60.82587432   29.11354292] with length 25
last10PointsDistances = [ 171.74448601  155.18355188  141.53395775  123.02827101  106.33857862
   95.09413299   94.55392313   92.58824824   60.82587432   29.11354292] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 25
last5MinsDistances.max() = 457.049538803, last10PointsDistance.max() = 171.744486011
------------------------------2015-07-23 08:18:47------------------------------
last5MinsDistances = [ 480.73692506  466.89365814  452.99846364  433.8421344   418.91096058
  399.32965715  380.82378969  359.91395186  347.95878154  333.87161033
  318.98981215  296.47811548  269.7649693   248.92796349  223.17905705
  195.63196501  177.42306008  161.908508    145.77754302  131.99269566
  122.33407963  121.95195886  119.86630534   87.9215932    56.46591604
   27.41050653] with length 26
last10PointsDistances = [ 177.42306008  161.908508    145.77754302  131.99269566  122.33407963
  121.95195886  119.86630534   87.9215932    56.46591604   27.41050653] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 26
last5MinsDistances.max() = 480.736925063, last10PointsDistance.max() = 177.423060076
------------------------------2015-07-23 08:18:53------------------------------
last5MinsDistances = [ 504.45916719  490.06776975  475.24530189  455.19099889  439.14553597
  420.05436323  403.47924826  384.17909663  373.66494264  360.12296727
  346.08131937  324.10944885  297.01306613  275.96034045  249.2852328
  220.57744481  200.55980286  183.15353556  169.92112877  159.68124864
  152.44147676  152.86004007  151.02211183  119.19953969   87.5406553
   58.43466709   31.38498798] with length 27
last10PointsDistances = [ 183.15353556  169.92112877  159.68124864  152.44147676  152.86004007
  151.02211183  119.19953969   87.5406553    58.43466709   31.38498798] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 27
last5MinsDistances.max() = 504.459167192, last10PointsDistance.max() = 183.153535563
------------------------------2015-07-23 08:19:29------------------------------
last5MinsDistances = [ 522.79624827  507.731252    491.76867544  470.65847629  453.30598357
  434.89657506  420.78946571  403.62803386  395.05985439  382.31125211
  369.49020898  348.37286131  320.85732448  299.62319272  271.90819162
  242.02299106  220.13319586  200.9093973   191.18133733  185.27401443
  181.40171191  183.2433608   182.00541452  150.69400033  118.7637032
   90.02244639   64.07403971   33.55411584] with length 28
last10PointsDistances = [ 191.18133733  185.27401443  181.40171191  183.2433608   182.00541452
  150.69400033  118.7637032    90.02244639   64.07403971   33.55411584] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 28
last5MinsDistances.max() = 522.796248267, last10PointsDistance.max() = 191.181337333
------------------------------2015-07-23 08:19:59------------------------------
last5MinsDistances = [ 745.44543847  731.33044964  716.73415682  696.64759596  680.2706285
  661.37883638  644.88571134  624.75038351  612.62428848  598.22351081
  582.5244832   559.30655035  533.28847298  512.7932803   487.81532663
  460.50825778  441.66327084  424.65095446  410.43304744  395.93002299
  381.52701149  376.70256576  372.19102257  341.31707701  315.26283894
  289.61065528  264.88117762  241.50331619  228.24471664] with length 29
last10PointsDistances = [ 395.93002299  381.52701149  376.70256576  372.19102257  341.31707701
  315.26283894  289.61065528  264.88117762  241.50331619  228.24471664] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 29
last5MinsDistances.max() = 745.445438474, last10PointsDistance.max() = 395.930022986
------------------------------2015-07-23 08:20:29------------------------------
last5MinsDistances = [ 779.37276502  765.92395886  752.36034609  733.18631771  717.83976268
  698.48084003  680.12441273  658.2939096   644.47607772  629.44076189
  612.67846735  588.86860673  563.6783852   543.68375675  520.03841223
  494.08221958  476.77886805  461.03718462  444.95491283  427.75217712
  410.7429309   404.37196451  399.21307227  369.62196748  346.03284067
  322.3389222   299.39258109  279.06357645  269.88228122   51.4384631 ] with length 30
last10PointsDistances = [ 410.7429309   404.37196451  399.21307227  369.62196748  346.03284067
  322.3389222   299.39258109  279.06357645  269.88228122   51.4384631 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 30
last5MinsDistances.max() = 779.372765021, last10PointsDistance.max() = 410.742930902
------------------------------2015-07-23 08:20:59------------------------------
last5MinsDistances = [ 810.18849858  797.24264287  784.44249842  765.94954808  751.35633071
  731.69863186  712.05636996  689.06446676  674.06823747  658.61670326
  641.13743262  616.97679437  592.46566656  572.89856951  550.27951999
  525.36111365  509.18006941  494.35618533  477.08607819  458.13750324
  439.44522143  432.04969767  426.47968692  398.00699268  376.27354872
  354.06524071  332.45760152  314.17193669  307.42996789   93.85547817
   42.44453008] with length 31
last10PointsDistances = [ 432.04969767  426.47968692  398.00699268  376.27354872  354.06524071
  332.45760152  314.17193669  307.42996789   93.85547817   42.44453008] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 31
last5MinsDistances.max() = 810.188498584, last10PointsDistance.max() = 432.049697673
------------------------------2015-07-23 08:21:29------------------------------
last5MinsDistances = [ 809.4817553   797.24753383  779.27168146  765.25321513  745.38845849
  724.81821026  701.01668587  685.20904709  669.48843231  651.53994372
  627.17664617  603.16914783  583.92907382  562.06030242  537.91500465
  522.56251568  508.43017827  490.34156794  470.21898886  450.43655882
  442.3818013   436.55894016  408.92618251  388.51546088  367.4040631
  346.80900111  330.04544803  325.15498176  117.45528785   66.09883144
   24.54737362] with length 31
last10PointsDistances = [ 436.55894016  408.92618251  388.51546088  367.4040631   346.80900111
  330.04544803  325.15498176  117.45528785   66.09883144   24.54737362] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 31
last5MinsDistances.max() = 809.481755303, last10PointsDistance.max() = 436.558940164
------------------------------2015-07-23 08:21:59------------------------------
last5MinsDistances = [ 700.87460933  685.04301303  669.31477468  651.35302684  626.98437901
  602.99181685  583.76166961  561.91563583  537.79445205  522.4683033
  508.35861584  490.24422818  470.08593963  450.27176677  442.19826492
  436.368432    408.76096116  388.39055885  367.31425127  346.75294028
  330.04185759  325.21914802  117.82569597   66.4883515    25.04643562
    0.66927181] with length 26
last10PointsDistances = [ 408.76096116  388.39055885  367.31425127  346.75294028  330.04185759
  325.21914802  117.82569597   66.4883515    25.04643562    0.66927181] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 26
last5MinsDistances.max() = 700.874609327, last10PointsDistance.max() = 408.760961155
------------------------------2015-07-23 08:22:29------------------------------
last5MinsDistances = [ 578.55936015  558.68435735  535.32874111  509.65716263  492.6551869
  477.15080125  460.7477708   443.04869104  425.53498377  418.8485557
  413.55936939  384.29167031  361.24077181  337.95780161  315.3657816
  295.55332348  286.9146763    68.11506825   17.44544166   26.25279765
   50.66772497   51.13005205] with length 22
last10PointsDistances = [ 361.24077181  337.95780161  315.3657816   295.55332348  286.9146763
   68.11506825   17.44544166   26.25279765   50.66772497   51.13005205] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 22
last5MinsDistances.max() = 578.559360146, last10PointsDistance.max() = 361.240771812
------------------------------2015-07-23 08:23:29------------------------------
last5MinsDistances = [ 387.71513582  365.3475014   342.63109149  320.56730922  301.60318972
  294.07116551   78.95356063   27.53510362   14.90950454   38.91601014
   39.35235426   11.9950613 ] with length 12
last10PointsDistances = [ 342.63109149  320.56730922  301.60318972  294.07116551   78.95356063
   27.53510362   14.90950454   38.91601014   39.35235426   11.9950613 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 12
last5MinsDistances.max() = 387.715135819, last10PointsDistance.max() = 342.631091489
------------------------------2015-07-23 08:23:59------------------------------
last5MinsDistances = [ 346.8868259   118.67627957   84.23454496   70.83051254   81.39357118
   82.04280207   71.79787025   73.08927083] with length 8
last10PointsDistances = [ 381.12643699  359.1494663   346.8868259   118.67627957   84.23454496
   70.83051254   81.39357118   82.04280207   71.79787025   73.08927083] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 346.886825901, last10PointsDistance.max() = 381.126436988
------------------------------2015-07-23 08:26:17------------------------------
last5MinsDistances = [ 38.74867025  39.18534937  12.15250386   0.16915282  73.05802193] with length 5
last10PointsDistances = [ 301.73806678  294.2164188    79.12262626   27.70392387   14.74073477
   38.74867025   39.18534937   12.15250386    0.16915282   73.05802193] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 73.0580219286, last10PointsDistance.max() = 301.738066781
------------------------------2015-07-23 08:29:04------------------------------
last5MinsDistances = [ 2691.23487098] with length 1
last10PointsDistances = [ 2445.10873363  2612.18881231  2663.60713473  2705.92991972  2729.63294118
  2729.99452277  2679.86676123  2691.06572891  2704.79692532  2691.23487098] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 1
last5MinsDistances.max() = 2691.23487098, last10PointsDistance.max() = 2729.99452277
------------------------------2015-07-23 08:29:34------------------------------
last5MinsDistances = [ 3072.43760467   381.20441341] with length 2
last10PointsDistances = [ 2993.39265066  3044.81058369  3087.13216599  3110.83709198  3111.19875293
  3061.06737587  3072.26846337  3085.85318583  3072.43760467   381.20441341] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 2
last5MinsDistances.max() = 3072.43760467, last10PointsDistance.max() = 3111.19875293
------------------------------2015-07-23 08:35:14------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 6880.94390849  6922.69076013  6946.93200311  6947.35009172  6896.44048605
  6908.03242153  6913.51880135  6908.20041631  4241.5494464   3866.35654403] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-07-23 08:35:44------------------------------
last5MinsDistances = [ 3.53614841] with length 1
last10PointsDistances = [ 6920.88937928  6945.1323162   6945.55063379  6894.63894742  6906.23224152
  6911.68661814  6906.40022758  4239.95773412  3864.81775613     3.53614841] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 1
last5MinsDistances.max() = 3.5361484142, last10PointsDistance.max() = 6945.55063379
------------------------------2015-07-23 08:36:44------------------------------
last5MinsDistances = [ 6.14647393  3.59339192] with length 2
last10PointsDistances = [ 6941.54011296  6941.9584236   6891.04680095  6902.64005319  6908.0956111
  6902.80803952  4236.36743638  3861.23045711     6.14647393     3.59339192] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 2
last5MinsDistances.max() = 6.1464739269, last10PointsDistance.max() = 6941.9584236
------------------------------2015-07-23 08:38:44------------------------------
last5MinsDistances = [ 2305.35553077  2306.92252036  2310.5117387 ] with length 3
last10PointsDistances = [ 9247.74809874  9196.75761264  9208.40621255  9212.41172652  9208.57380179
  6546.84617199  6171.66839026  2305.35553077  2306.92252036  2310.5117387 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 2310.5117387, last10PointsDistance.max() = 9247.74809874
------------------------------2015-07-23 08:39:44------------------------------
last5MinsDistances = [ 2680.05104714  2681.66723691  2685.25870354   376.717567  ] with length 4
last10PointsDistances = [ 9572.93697633  9584.57939533  9588.7307894   9584.74703362  6921.56243215
  6545.9720233   2680.05104714  2681.66723691  2685.25870354   376.717567  ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 2685.25870354, last10PointsDistance.max() = 9588.7307894
------------------------------2015-07-23 08:40:14------------------------------
last5MinsDistances = [ 2700.2640284   2703.8566237    399.14295375    36.53697416] with length 4
last10PointsDistances = [ 9604.35714182  9608.74154103  9604.52485156  6939.87805509  6563.9852287
  2698.61116684  2700.2640284   2703.8566237    399.14295375    36.53697416] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 2703.8566237, last10PointsDistance.max() = 9608.74154103
------------------------------2015-07-23 08:40:44------------------------------
last5MinsDistances = [ 2706.96004018   396.45116256    48.41251186    75.06443261] with length 4
last10PointsDistances = [ 9607.99665735  9604.3500055   6943.2841097   6568.11864312  2701.80549422
  2703.37092586  2706.96004018   396.45116256    48.41251186    75.06443261] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 2706.96004018, last10PointsDistance.max() = 9607.99665735
------------------------------2015-07-23 08:44:15------------------------------
last5MinsDistances = [ 2068.36032406  2049.83130889  2047.96544756] with length 3
last10PointsDistances = [ 11652.29466352   8989.70136232   8613.78636408   4748.32012611
   4749.95261669   4753.54461871   2443.96446693   2068.36032406
   2049.83130889   2047.96544756] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 2068.36032406, last10PointsDistance.max() = 11652.2946635
------------------------------2015-07-23 08:49:15------------------------------
last5MinsDistances = [ 5402.99196929] with length 1
last10PointsDistances = [ 14391.34472053  14016.0406418   10149.84681874  10151.4216397
  10155.01118243   7844.50474149   7470.08844617   7452.3280834
   7448.06253234   5402.99196929] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 1
last5MinsDistances.max() = 5402.99196929, last10PointsDistance.max() = 14391.3447205
------------------------------2015-07-23 08:49:45------------------------------
last5MinsDistances = [ 69.72745353] with length 1
last10PointsDistances = [ 14076.87602152  10210.59666491  10212.16083051  10215.74979379
   7905.24132553   7531.01308212   7513.39688589   7508.79117259
   5464.32498076     69.72745353] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 1
last5MinsDistances.max() = 69.7274535279, last10PointsDistance.max() = 14076.8760215
------------------------------2015-07-23 08:50:15------------------------------
last5MinsDistances = [ 71.11083133  25.49899497] with length 2
last10PointsDistances = [ 10195.39359459  10196.95139524  10200.53999367   7890.04639419
   7515.93457473   7498.40617193   7493.59526392   5449.52540023
     71.11083133     25.49899497] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 2
last5MinsDistances.max() = 71.1108313301, last10PointsDistance.max() = 10200.5399937
------------------------------2015-07-23 08:52:45------------------------------
last5MinsDistances = [ 1525.71145758  1464.86193938  1480.43381226] with length 3
last10PointsDistances = [ 11676.95933373  11680.54851664   9370.03685697   8995.71863622
   8978.00809504   8973.58871504   6928.70342518   1525.71145758
   1464.86193938   1480.43381226] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 1525.71145758, last10PointsDistance.max() = 11680.5485166
------------------------------2015-07-23 08:53:15------------------------------
last5MinsDistances = [ 2164.50054004  2101.77347053  2116.0142981    646.28577515] with length 4
last10PointsDistances = [ 12315.11377897  10004.75733255   9631.00668745   9613.70178291
   9608.32197715   7565.24248744   2164.50054004   2101.77347053
   2116.0142981     646.28577515] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 2164.50054004, last10PointsDistance.max() = 12315.113779
------------------------------2015-07-23 08:53:45------------------------------
last5MinsDistances = [ 3130.84543711  3067.40789455  3081.05232052  1613.58976794   967.96183024] with length 5
last10PointsDistances = [ 10965.82928067  10592.61951085  10575.66364022  10569.45839957
   8528.19639664   3130.84543711   3067.40789455   3081.05232052
   1613.58976794    967.96183024] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 3130.84543711, last10PointsDistance.max() = 10965.8292807
------------------------------2015-07-23 08:54:15------------------------------
last5MinsDistances = [ 4077.48904376  4090.95777458  2623.18037035  1978.17720205  1010.40928548] with length 5
last10PointsDistances = [ 11599.98611741  11583.25529072  11576.51738491   9536.52875941
   4141.10124243   4077.48904376   4090.95777458   2623.18037035
   1978.17720205   1010.40928548] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 4090.95777458, last10PointsDistance.max() = 11599.9861174
------------------------------2015-07-23 08:55:15------------------------------
last5MinsDistances = [ 4469.06228139  3823.33837266  2855.48913211  1846.70878535] with length 4
last10PointsDistances = [ 13413.9224686   13405.69590606  11369.91858163   5983.11126582
   5918.73348822   5931.55354866   4469.06228139   3823.33837266
   2855.48913211   1846.70878535] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 4469.06228139, last10PointsDistance.max() = 13413.9224686
------------------------------2015-07-23 08:55:45------------------------------
last5MinsDistances = [ 5619.90377128  4975.19493263  4007.38690312  2997.02244177  1158.86541531] with length 5
last10PointsDistances = [ 14564.17401914  12527.718382     7137.53387263   7073.57114935
   7086.71169688   5619.90377128   4975.19493263   4007.38690312
   2997.02244177   1158.86541531] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 5619.90377128, last10PointsDistance.max() = 14564.1740191
------------------------------2015-07-23 08:56:15------------------------------
last5MinsDistances = [ 6329.82285265  5684.75648019  4716.81980389  3706.67011117  1863.69345275
   711.33235655] with length 6
last10PointsDistances = [ 13233.28218013   7846.14925467   7781.95256918   7794.89905535
   6329.82285265   5684.75648019   4716.81980389   3706.67011117
   1863.69345275    711.33235655] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 6329.82285265, last10PointsDistance.max() = 13233.2821801
------------------------------2015-07-23 08:58:03------------------------------
last5MinsDistances = [ 6256.86758961  5289.02786027  4279.89887211  2433.53916033  1292.99465738
   585.87698049] with length 6
last10PointsDistances = [ 8415.67669843  8351.02409219  8363.58717388  6902.5949928   6256.86758961
  5289.02786027  4279.89887211  2433.53916033  1292.99465738   585.87698049] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 6256.86758961, last10PointsDistance.max() = 8415.67669843
------------------------------2015-07-23 09:00:45------------------------------
last5MinsDistances = [ 2578.29252072  1992.54078027] with length 2
last10PointsDistances = [ 10308.80440721  10320.46626851   8870.32349438   8224.03780133
   7257.97123067   6252.81235599   4408.12405092   3283.86153122
   2578.29252072   1992.54078027] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 2
last5MinsDistances.max() = 2578.29252072, last10PointsDistance.max() = 10320.4662685
------------------------------2015-07-23 09:01:15------------------------------
last5MinsDistances = [ 2720.96138996   728.82810835] with length 2
last10PointsDistances = [ 11043.43678056   9595.77831898   8949.51514785   7983.98295582
   6979.70737519   5135.80685081   4012.6363459    3306.55995902
   2720.96138996    728.82810835] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 2
last5MinsDistances.max() = 2720.96138996, last10PointsDistance.max() = 11043.4367806
------------------------------2015-07-23 09:03:15------------------------------
last5MinsDistances = [ 2452.05683544  1726.10004016] with length 2
last10PointsDistances = [ 11321.74799492  10675.4747298    9709.73823941   8704.86362879
   6860.02787148   5730.50476281   5021.47017125   4437.51374646
   2452.05683544   1726.10004016] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 2
last5MinsDistances.max() = 2452.05683544, last10PointsDistance.max() = 11321.7479949
------------------------------2015-07-23 09:04:45------------------------------
last5MinsDistances = [ 3746.82399989  3036.58513624  1352.35793794] with length 3
last10PointsDistances = [ 11957.13645195  10989.54383428   9980.93014994   8134.29503937
   6989.6233252    6278.29393893   5701.19432527   3746.82399989
   3036.58513624   1352.35793794] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 3746.82399989, last10PointsDistance.max() = 11957.1364519
------------------------------2015-07-23 09:05:16------------------------------
last5MinsDistances = [ 4623.53939218  3918.20125263  2236.72565074   885.88089305] with length 4
last10PointsDistances = [ 11853.18557692  10843.63948954   8997.76690424   7848.78092571
   7137.84640819   6564.31545551   4623.53939218   3918.20125263
   2236.72565074    885.88089305] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 4623.53939218, last10PointsDistance.max() = 11853.1855769
------------------------------2015-07-23 09:07:46------------------------------
last5MinsDistances = [ 6017.31183133  4664.95407799  3782.2112704 ] with length 3
last10PointsDistances = [ 14488.72786753  12654.33248582  11496.0942461   10791.89904189
  10235.20589562   8354.06265264   7669.28884239   6017.31183133
   4664.95407799   3782.2112704 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 6017.31183133, last10PointsDistance.max() = 14488.7278675
------------------------------2015-07-23 09:08:16------------------------------
last5MinsDistances = [ 4657.45335174  3774.44914977    16.86922108] with length 3
last10PointsDistances = [ 12649.95553244  11491.76987343  10787.42842924  10230.45395235
   8348.17602463   7662.91339336   6009.80761473   4657.45335174
   3774.44914977     16.86922108] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 4657.45335174, last10PointsDistance.max() = 12649.9555324
------------------------------2015-07-23 09:08:46------------------------------
last5MinsDistances = [ 4679.82111185  3797.22693983    17.09172994    32.48617321] with length 4
last10PointsDistances = [ 11508.95766358  10804.86378849  10248.3623719    8367.96112837
   7683.49090103   6032.17603301   4679.82111185   3797.22693983
     17.09172994     32.48617321] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 4679.82111185, last10PointsDistance.max() = 11508.9576636
------------------------------2015-07-23 09:09:16------------------------------
last5MinsDistances = [ 4651.45950338  3768.5598277     16.25493109     8.50457871    33.32412146] with length 5
last10PointsDistances = [ 10780.39288884  10223.50221074   8341.58840757   7656.49607947
   6003.81648382   4651.45950338   3768.5598277      16.25493109
      8.50457871     33.32412146] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 4651.45950338, last10PointsDistance.max() = 10780.3928888
------------------------------2015-07-23 09:09:46------------------------------
last5MinsDistances = [ 3773.24373112    14.2972415      4.02066572    30.79202207     5.21890744] with length 5
last10PointsDistances = [ 10228.53968871   8346.51664123   7661.36852957   6008.53865943
   4656.1824745    3773.24373112     14.2972415       4.02066572
     30.79202207      5.21890744] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 3773.24373112, last10PointsDistance.max() = 10228.5396887
------------------------------2015-07-23 09:10:16------------------------------
last5MinsDistances = [  2.76813216  19.18884356  14.32498689  19.0106289   16.8614079 ] with length 5
last10PointsDistances = [ 8356.35861151  7671.63189434  6019.75704307  4667.39950324  3784.67934868
     2.76813216    19.18884356    14.32498689    19.0106289     16.8614079 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 19.1888435592, last10PointsDistance.max() = 8356.35861151
------------------------------2015-07-23 09:10:46------------------------------
last5MinsDistances = [  1.26001834  17.92189591  15.83178649  17.5108204   15.46433117
   1.50850996] with length 6
last10PointsDistances = [ 7670.34273321  6018.41370345  4666.0560406   3783.32390346     1.26001834
    17.92189591    15.83178649    17.5108204     15.46433117     1.50850996] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 17.9218959075, last10PointsDistance.max() = 7670.34273321
------------------------------2015-07-23 09:11:16------------------------------
last5MinsDistances = [ 16.89380097   0.04447797  32.49877623   8.54761982   4.06422052
  19.21022399  17.94497885] with length 7
last10PointsDistances = [ 6009.82997052  4657.47573048  3774.47087136    16.89380097     0.04447797
    32.49877623     8.54761982     4.06422052    19.21022399    17.94497885] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 7
last5MinsDistances.max() = 32.4987762349, last10PointsDistance.max() = 6009.82997052
------------------------------2015-07-23 09:11:46------------------------------
last5MinsDistances = [  6.1356942   12.52306413  19.9631265   14.92681485  11.20498772
   7.45043228   6.64449574  12.53565601] with length 8
last10PointsDistances = [ 4666.07366274  3783.22461626     6.1356942     12.52306413    19.9631265
    14.92681485    11.20498772     7.45043228     6.64449574    12.53565601] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 19.9631265013, last10PointsDistance.max() = 4666.07366274
------------------------------2015-07-23 09:57:43------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 25147.11355104  24254.44875007  24240.95285704  24260.0891105
  24247.98084889  24244.93557955  24255.28535329  24254.85169138
  24240.91096571  24248.31306818] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-07-23 09:58:47------------------------------
last5MinsDistances = [ 549.89745693] with length 1
last10PointsDistances = [ 24245.97202786  24232.2500834   24251.97669041  24239.16764556
  24236.21928159  24246.86823897  24246.40193227  24232.2085419
  24239.83820219    549.89745693] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 1
last5MinsDistances.max() = 549.897456928, last10PointsDistance.max() = 24251.9766904
------------------------------2015-07-23 09:59:02------------------------------
last5MinsDistances = [ 794.64523421  259.27382314] with length 2
last10PointsDistances = [ 24129.71016149  24149.68995301  24136.57867713  24133.67285265
  24144.45000156  24143.96959478  24129.66877853  24137.39601409
    794.64523421    259.27382314] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 2
last5MinsDistances.max() = 794.645234212, last10PointsDistance.max() = 24149.689953
------------------------------2015-07-23 09:59:34------------------------------
last5MinsDistances = [ 1281.93331504   732.53896524   497.0576502 ] with length 3
last10PointsDistances = [ 24219.07794488  24205.34568779  24202.52875686  24213.56771949
  24213.05830239  24198.53970294  24206.4663722    1281.93331504
    732.53896524    497.0576502 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 1281.93331504, last10PointsDistance.max() = 24219.0779449
------------------------------2015-07-23 10:05:46------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 27397.29880271  27394.47156963  27405.4800699   27404.97408242
  27390.48069109  27398.384181     3408.18775955   3238.79246082
   3293.52080469   3192.51992119] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-07-23 10:07:47------------------------------
last5MinsDistances = [ 1510.58007896] with length 1
last10PointsDistances = [ 28725.31653478  28735.99604242  28735.52643561  28721.3073703
  28728.96033775   4528.94133084   4489.53708131   4595.84818046
   4581.9391615    1510.58007896] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 1
last5MinsDistances.max() = 1510.58007896, last10PointsDistance.max() = 28735.9960424
------------------------------2015-07-23 10:08:17------------------------------
last5MinsDistances = [ 2142.84202756   635.1883498 ] with length 2
last10PointsDistances = [ 29264.16127294  29263.70914336  29249.62431863  29257.15591479
   5020.47418899   5024.17871166   5146.46313065   5162.00246947
   2142.84202756    635.1883498 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 2
last5MinsDistances.max() = 2142.84202756, last10PointsDistance.max() = 29264.1612729
------------------------------2015-07-23 10:13:20------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 31955.49841504  31941.67595708  31948.97249337   7706.14453631
   7764.04400876   7902.17958801   7940.25153064   4894.51418055
   3394.25683932   2784.22341218] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-07-23 10:13:47------------------------------
last5MinsDistances = [ 28.70328207] with length 1
last10PointsDistances = [ 31966.72282381  31974.02382965   7730.73286157   7787.5263152
   7925.19074067   7962.14626356   4913.33303043   3414.01302027
   2805.15413349     28.70328207] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 1
last5MinsDistances.max() = 28.7032820683, last10PointsDistance.max() = 31974.0238297
------------------------------2015-07-23 10:14:17------------------------------
last5MinsDistances = [ 73.51639635  47.97491861] with length 2
last10PointsDistances = [ 31995.56706719   7751.01325335   7804.69626818   7941.10034237
   7975.20406296   4919.36378597   3422.27457692   2816.22930532
     73.51639635     47.97491861] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 2
last5MinsDistances.max() = 73.5163963549, last10PointsDistance.max() = 31995.5670672
------------------------------2015-07-23 10:14:47------------------------------
last5MinsDistances = [ 77.63154529  52.35083817   4.43674859] with length 3
last10PointsDistances = [ 7752.18080838  7805.55995095  7941.84179832  7975.67164266  4919.17786891
  3422.30731898  2816.5342717     77.63154529    52.35083817     4.43674859] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 77.6315452925, last10PointsDistance.max() = 7975.67164266
------------------------------2015-07-23 10:15:17------------------------------
last5MinsDistances = [ 132.13006407  105.06805835   59.05991428   55.34940281] with length 4
last10PointsDistances = [ 7845.28648316  7980.47422859  8011.7661871   4948.82075248  3454.30949785
  2851.29843216   132.13006407   105.06805835    59.05991428    55.34940281] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 132.130064075, last10PointsDistance.max() = 8011.7661871
------------------------------2015-07-23 10:15:47------------------------------
last5MinsDistances = [ 169.12698961  141.82421529   96.12082199   92.36936516   37.06653486] with length 5
last10PointsDistances = [ 8004.69244227  8034.20022707  4966.86368415  3474.08681816  2873.05028511
   169.12698961   141.82421529    96.12082199    92.36936516    37.06653486] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 169.12698961, last10PointsDistance.max() = 8034.20022707
------------------------------2015-07-23 10:16:17------------------------------
last5MinsDistances = [ 174.45714664  146.20249418  103.77648728  100.60007653   47.33037535
   22.0138719 ] with length 6
last10PointsDistances = [ 8054.34266054  4988.05026923  3494.910956    2893.3700945    174.45714664
   146.20249418   103.77648728   100.60007653    47.33037535    22.0138719 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 174.457146644, last10PointsDistance.max() = 8054.34266054
------------------------------2015-07-23 10:17:17------------------------------
last5MinsDistances = [ 123.20006198   95.30026078   52.15888384   49.16332926   14.8962538
   47.29632152   51.7012595 ] with length 7
last10PointsDistances = [ 4955.26809233  3460.04297377  2856.15306743   123.20006198    95.30026078
    52.15888384    49.16332926    14.8962538     47.29632152    51.7012595 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 7
last5MinsDistances.max() = 123.200061985, last10PointsDistance.max() = 4955.26809233
------------------------------2015-07-23 10:18:18------------------------------
last5MinsDistances = [ 352.58658077  327.88725804  279.95639518  275.62792136  225.13352622
  191.62310626  198.12271997  237.98701075] with length 8
last10PointsDistances = [ 3495.7680349   2908.06654251   352.58658077   327.88725804   279.95639518
   275.62792136   225.13352622   191.62310626   198.12271997   237.98701075] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 352.586580768, last10PointsDistance.max() = 3495.7680349
------------------------------2015-07-23 10:18:47------------------------------
last5MinsDistances = [ 306.07169497  301.65515782  254.64919326  223.81013912  233.19846051
  268.40475812   44.89587117] with length 7
last10PointsDistances = [ 2881.70851368   376.9414348    353.91902645   306.07169497   301.65515782
   254.64919326   223.81013912   233.19846051   268.40475812    44.89587117] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 7
last5MinsDistances.max() = 306.071694973, last10PointsDistance.max() = 2881.70851368
------------------------------2015-07-23 10:19:17------------------------------
last5MinsDistances = [ 327.26395785  275.07875138  240.0076944   243.57655865  287.12794802
   55.5706337    66.41637253] with length 7
last10PointsDistances = [ 404.69110448  379.21661654  331.51594587  327.26395785  275.07875138
  240.0076944   243.57655865  287.12794802   55.5706337    66.41637253] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 7
last5MinsDistances.max() = 327.263957846, last10PointsDistance.max() = 404.691104483
------------------------------2015-07-23 10:20:17------------------------------
last5MinsDistances = [ 234.91491912  235.92730483  282.19983052   67.71565067   91.18357902
   28.57913324] with length 6
last10PointsDistances = [ 376.06057415  328.92666385  324.80050069  271.09809881  234.91491912
  235.92730483  282.19983052   67.71565067   91.18357902   28.57913324] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 282.199830524, last10PointsDistance.max() = 376.060574147
------------------------------2015-07-23 10:20:47------------------------------
last5MinsDistances = [ 345.08938953  391.94122708  166.74635543  165.42453871  111.20268507
  109.81232421] with length 6
last10PointsDistances = [ 438.69216548  434.55132081  380.90879667  344.67228108  345.08938953
  391.94122708  166.74635543  165.42453871  111.20268507  109.81232421] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 391.941227078, last10PointsDistance.max() = 438.692165478
------------------------------2015-07-23 10:21:17------------------------------
last5MinsDistances = [ 421.96562406  204.37441443  206.35623924  149.01097009  142.70608526
   41.841508  ] with length 6
last10PointsDistances = [ 466.10489969  411.67813692  374.95468772  373.54703136  421.96562406
  204.37441443  206.35623924  149.01097009  142.70608526   41.841508  ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 421.965624055, last10PointsDistance.max() = 466.104899687
------------------------------2015-07-23 10:23:48------------------------------
last5MinsDistances = [ 269.05557813  261.24721999  159.97955468  120.06516883] with length 4
last10PointsDistances = [ 525.87500983  488.85871165  485.35685047  535.24836264  324.33598524
  325.37006857  269.05557813  261.24721999  159.97955468  120.06516883] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 269.055578134, last10PointsDistance.max() = 535.248362645
------------------------------2015-07-23 10:24:18------------------------------
last5MinsDistances = [ 295.16167851  196.55045109  155.87491471   37.73255405] with length 4
last10PointsDistances = [ 519.4581062   514.97578137  565.41433874  359.39180546  361.95024506
  304.40972144  295.16167851  196.55045109  155.87491471   37.73255405] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 295.161678512, last10PointsDistance.max() = 565.414338736
------------------------------2015-07-23 10:25:18------------------------------
last5MinsDistances = [ 197.09322068  155.49850066   47.39129806   22.38457067] with length 4
last10PointsDistances = [ 505.5621258   556.3969836   356.33845402  361.67123254  302.02521842
  290.79639965  197.09322068  155.49850066   47.39129806   22.38457067] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 197.093220685, last10PointsDistance.max() = 556.396983595
------------------------------2015-07-23 10:26:18------------------------------
last5MinsDistances = [ 250.03912247  212.66217096  212.89573238] with length 3
last10PointsDistances = [ 760.77504808  569.11249624  574.12175887  514.91797583  503.13045147
  408.92636456  367.76657083  250.03912247  212.66217096  212.89573238] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 250.039122468, last10PointsDistance.max() = 760.775048085
------------------------------2015-07-23 10:26:48------------------------------
last5MinsDistances = [ 213.99320871  176.29599245  174.50524489   41.3209514 ] with length 4
last10PointsDistances = [ 529.97159838  536.17619137  476.11946383  463.63434765  371.40405951
  329.94154832  213.99320871  176.29599245  174.50524489   41.3209514 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 213.99320871, last10PointsDistance.max() = 536.176191374
------------------------------2015-07-23 10:27:18------------------------------
last5MinsDistances = [ 202.14248085  164.41138556  161.8749014    54.82313239   13.52618622] with length 5
last10PointsDistances = [ 523.50658032  463.20323393  450.51558725  358.91048491  317.36936221
  202.14248085  164.41138556  161.8749014    54.82313239   13.52618622] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 202.142480854, last10PointsDistance.max() = 523.506580319
------------------------------2015-07-23 10:27:48------------------------------
last5MinsDistances = [ 213.7390349   176.24416923  176.15498271   36.74684213   13.39909811
   22.71548784] with length 6
last10PointsDistances = [ 478.17423268  466.41319953  372.32817836  331.10981917  213.7390349
  176.24416923  176.15498271   36.74684213   13.39909811   22.71548784] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 213.7390349, last10PointsDistance.max() = 478.174232678
------------------------------2015-07-23 10:28:18------------------------------
last5MinsDistances = [ 229.11673112  192.16745506  194.17418625   25.38127063   35.94584271
   46.94250518   24.24931725] with length 7
last10PointsDistances = [ 484.96315899  388.71787588  347.90337249  229.11673112  192.16745506
  194.17418625   25.38127063   35.94584271   46.94250518   24.24931725] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 7
last5MinsDistances.max() = 229.11673112, last10PointsDistance.max() = 484.963158987
------------------------------2015-07-23 10:28:48------------------------------
last5MinsDistances = [ 217.82216672  223.83535165   57.10127141   82.59169414   92.88367871
   70.2999657    46.68210642] with length 7
last10PointsDistances = [ 412.5066279   372.88072594  252.82238601  217.82216672  223.83535165
   57.10127141   82.59169414   92.88367871   70.2999657    46.68210642] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 7
last5MinsDistances.max() = 223.835351651, last10PointsDistance.max() = 412.506627899
------------------------------2015-07-23 10:29:18------------------------------
last5MinsDistances = [ 238.12625413   66.08727736   95.53691522  106.39823736   83.70129484
   59.6477533    14.68732003] with length 7
last10PointsDistances = [ 386.48430054  266.42206526  231.72963396  238.12625413   66.08727736
   95.53691522  106.39823736   83.70129484   59.6477533    14.68732003] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 7
last5MinsDistances.max() = 238.126254129, last10PointsDistance.max() = 386.484300543
------------------------------2015-07-23 10:29:52------------------------------
last5MinsDistances = [ 240.68732956   71.65497926  100.64546788  111.31369874   88.64960627
   64.71263434   18.74522625    5.57609287] with length 8
last10PointsDistances = [ 268.20599556  233.83204398  240.68732956   71.65497926  100.64546788
  111.31369874   88.64960627   64.71263434   18.74522625    5.57609287] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 240.687329561, last10PointsDistance.max() = 268.20599556
------------------------------2015-07-23 10:30:12------------------------------
last5MinsDistances = [ 260.66595202   83.59403808  116.754366    128.19223632  105.48875093
   81.24993599   37.77773536   23.09047045   19.97912869] with length 9
last10PointsDistances = [ 253.74864543  260.66595202   83.59403808  116.754366    128.19223632
  105.48875093   81.24993599   37.77773536   23.09047045   19.97912869] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 260.665952025, last10PointsDistance.max() = 260.665952025
------------------------------2015-07-23 10:30:34------------------------------
last5MinsDistances = [ 136.10345521  176.55972158  189.70046255  168.397082    145.53934298
  111.95556169   98.25963553   96.77570119   77.50543118] with length 9
last10PointsDistances = [ 335.38169298  136.10345521  176.55972158  189.70046255  168.397082
  145.53934298  111.95556169   98.25963553   96.77570119   77.50543118] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 189.700462547, last10PointsDistance.max() = 335.381692985
------------------------------2015-07-23 10:31:20------------------------------
last5MinsDistances = [ 164.65359078  177.85506283  156.73385707  134.12663974  102.25896859
   89.02917748   88.04357753   69.47385892   12.37947129] with length 9
last10PointsDistances = [ 124.03251381  164.65359078  177.85506283  156.73385707  134.12663974
  102.25896859   89.02917748   88.04357753   69.47385892   12.37947129] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 177.855062834, last10PointsDistance.max() = 177.855062834
------------------------------2015-07-23 10:31:52------------------------------
last5MinsDistances = [ 144.58177957  122.14131712   98.06786134   58.49790249   44.14811791
   42.05175896   22.5266939    54.97934713   47.2480113 ] with length 9
last10PointsDistances = [ 132.35029585  144.58177957  122.14131712   98.06786134   58.49790249
   44.14811791   42.05175896   22.5266939    54.97934713   47.2480113 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 144.58177957, last10PointsDistance.max() = 144.58177957
------------------------------2015-07-23 10:32:22------------------------------
last5MinsDistances = [ 121.27977769   97.1465519    56.84423952   42.3813351    40.06313785
   20.34015258   57.24020279   49.71631542    2.62132968] with length 9
last10PointsDistances = [ 143.7824268   121.27977769   97.1465519    56.84423952   42.3813351
   40.06313785   20.34015258   57.24020279   49.71631542    2.62132968] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 121.279777695, last10PointsDistance.max() = 143.782426797
------------------------------2015-07-23 10:32:52------------------------------
last5MinsDistances = [ 96.8436141   57.52097046  43.23288769  41.26251212  21.91012967
  55.629675    47.66857994   1.34181777   3.00068226] with length 9
last10PointsDistances = [ 120.90251758   96.8436141    57.52097046   43.23288769   41.26251212
   21.91012967   55.629675     47.66857994    1.34181777    3.00068226] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 96.8436141042, last10PointsDistance.max() = 120.902517582
------------------------------2015-07-23 10:33:22------------------------------
last5MinsDistances = [ 57.58680476  43.28978377  41.30249288  21.92678196  55.60416538
  47.66978858   1.20560771   2.89306788   0.14545832] with length 9
last10PointsDistances = [ 96.94874362  57.58680476  43.28978377  41.30249288  21.92678196
  55.60416538  47.66978858   1.20560771   2.89306788   0.14545832] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 57.586804761, last10PointsDistance.max() = 96.9487436183
Found trip end at 2015-07-23 10:28:18
------------------------------2015-07-23 10:33:52------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [] with length 0, shape (0, 30)
len(last10PointsDistances) = 0, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-07-23 10:34:22------------------------------
last5MinsDistances = [ 1.16807448] with length 1
last10PointsDistances = [ 1.16807448] with length 1, shape (1,)
len(last10PointsDistances) = 1, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-07-23 14:31:07------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 60.92741197  62.09502703] with length 2, shape (2,)
len(last10PointsDistances) = 2, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-07-23 14:31:37------------------------------
last5MinsDistances = [ 14.3474287] with length 1
last10PointsDistances = [ 53.7097889  54.8435737  14.3474287] with length 3, shape (3,)
len(last10PointsDistances) = 3, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-07-23 14:32:07------------------------------
last5MinsDistances = [ 9.48616953  6.64483487] with length 2
last10PointsDistances = [ 53.05927873  54.21892029   9.48616953   6.64483487] with length 4, shape (4,)
len(last10PointsDistances) = 4, len(last5MinsDistances) = 2
Too few points to make a decision, continuing
------------------------------2015-07-23 14:32:37------------------------------
last5MinsDistances = [ 14.93350398   1.74142516   6.37228218] with length 3
last10PointsDistances = [ 51.98319406  53.11818497  14.93350398   1.74142516   6.37228218] with length 5, shape (5,)
len(last10PointsDistances) = 5, len(last5MinsDistances) = 3
Too few points to make a decision, continuing
------------------------------2015-07-23 14:33:07------------------------------
last5MinsDistances = [ 66.90200711  57.98198613  58.37735298  56.31584592] with length 4
last10PointsDistances = [ 10.00240457   9.38823218  66.90200711  57.98198613  58.37735298
  56.31584592] with length 6, shape (6,)
len(last10PointsDistances) = 6, len(last5MinsDistances) = 4
Too few points to make a decision, continuing
------------------------------2015-07-23 14:33:37------------------------------
last5MinsDistances = [ 71.05280316  62.40785829  62.64718302  60.73185601   4.57950896] with length 5
last10PointsDistances = [ 11.99114447  11.03809391  71.05280316  62.40785829  62.64718302
  60.73185601   4.57950896] with length 7, shape (7,)
len(last10PointsDistances) = 7, len(last5MinsDistances) = 5
Too few points to make a decision, continuing
------------------------------2015-07-23 14:34:06------------------------------
last5MinsDistances = [ 67.68511898  58.74472864  59.15586767  57.0801759    0.78432963
   3.91217824] with length 6
last10PointsDistances = [ 10.55677041   9.88561751  67.68511898  58.74472864  59.15586767
  57.0801759    0.78432963   3.91217824] with length 8, shape (8,)
len(last10PointsDistances) = 8, len(last5MinsDistances) = 6
Too few points to make a decision, continuing
------------------------------2015-07-23 14:35:06------------------------------
last5MinsDistances = [ 77.82196208  71.14092962  70.26988841  69.4103699   17.51921231
  13.81208124  17.14423238] with length 7
last10PointsDistances = [ 17.46692776  16.3619632   77.82196208  71.14092962  70.26988841
  69.4103699   17.51921231  13.81208124  17.14423238] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 7
Too few points to make a decision, continuing
------------------------------2015-07-23 14:37:08------------------------------
last5MinsDistances = [ 165.60031598  144.82359188  142.76284887  144.84573     130.14727087] with length 5
last10PointsDistances = [ 137.54653178  137.34616075  161.37335755  166.90288964  161.31232222
  165.60031598  144.82359188  142.76284887  144.84573     130.14727087] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 165.600315981, last10PointsDistance.max() = 166.902889645
------------------------------2015-07-23 14:37:12------------------------------
last5MinsDistances = [ 164.86659564  143.66322772  141.57218538  143.67951482  128.91464016
    1.58491261] with length 6
last10PointsDistances = [ 136.23060149  160.76585155  166.17892819  160.61967124  164.86659564
  143.66322772  141.57218538  143.67951482  128.91464016    1.58491261] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 164.866595642, last10PointsDistance.max() = 166.178928195
------------------------------2015-07-23 14:37:41------------------------------
last5MinsDistances = [ 142.37537581  140.25005112  142.38501658  127.54562903    3.35590836
    1.770996  ] with length 6
last10PointsDistances = [ 160.10159437  165.38297299  159.85950888  164.05975205  142.37537581
  140.25005112  142.38501658  127.54562903    3.35590836    1.770996  ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 142.385016575, last10PointsDistance.max() = 165.382972989
------------------------------2015-07-23 14:40:12------------------------------
last5MinsDistances = [ 307.42749174  307.32101793  307.21302539] with length 3
last10PointsDistances = [ 458.19273907  454.18478302  456.56642371  413.74675165  409.67218809
  413.30903487  396.27842603  307.42749174  307.32101793  307.21302539] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 307.427491736, last10PointsDistance.max() = 458.192739075
------------------------------2015-07-23 14:40:43------------------------------
last5MinsDistances = [ 337.79075974  337.74231137  337.69832114   32.60656795] with length 4
last10PointsDistances = [ 486.1063373   488.56866167  446.15234046  442.09519664  445.72007996
  428.67306158  337.79075974  337.74231137  337.69832114   32.60656795] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 337.790759744, last10PointsDistance.max() = 488.568661665
------------------------------2015-07-23 14:41:13------------------------------
last5MinsDistances = [ 378.73228724  378.84144522  378.97257483   85.17593115   54.29833947] with length 5
last10PointsDistances = [ 534.28622305  494.01514626  490.07999275  493.61922901  476.49714975
  378.73228724  378.84144522  378.97257483   85.17593115   54.29833947] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 378.972574832, last10PointsDistance.max() = 534.286223048
------------------------------2015-07-23 14:41:43------------------------------
last5MinsDistances = [ 445.61952109  445.78497274  445.97778748  152.21326632  119.98314902
   68.50022168] with length 6
last10PointsDistances = [ 562.48229888  558.55598228  562.08906272  544.96359965  445.61952109
  445.78497274  445.97778748  152.21326632  119.98314902   68.50022168] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 445.977787475, last10PointsDistance.max() = 562.482298883
------------------------------2015-07-23 14:42:43------------------------------
last5MinsDistances = [ 172.11538184  143.17895478   89.46914146   52.07872112] with length 4
last10PointsDistances = [ 564.04408432  567.40781325  550.28202869  442.62738633  442.97588342
  443.37299583  172.11538184  143.17895478   89.46914146   52.07872112] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 172.115381842, last10PointsDistance.max() = 567.407813246
------------------------------2015-07-23 14:43:15------------------------------
last5MinsDistances = [ 201.01756583  170.0437958   115.92083298   55.9430323    39.13206488] with length 5
last10PointsDistances = [ 603.27610072  586.1350353   480.37718601  480.69083172  481.04856473
  201.01756583  170.0437958   115.92083298   55.9430323    39.13206488] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 201.017565826, last10PointsDistance.max() = 603.276100725
------------------------------2015-07-23 14:43:43------------------------------
last5MinsDistances = [ 392.85600656  362.52739212  308.24269571  246.85669592  221.552396
  192.81733958] with length 6
last10PointsDistances = [ 766.59825782  652.06153546  652.61349162  653.23551834  392.85600656
  362.52739212  308.24269571  246.85669592  221.552396    192.81733958] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 392.856006559, last10PointsDistance.max() = 766.598257819
------------------------------2015-07-23 14:44:13------------------------------
last5MinsDistances = [ 388.29038768  356.47159407  303.23884962  236.79840701  223.66311615
  188.6178277    58.54030469] with length 7
last10PointsDistances = [ 664.78240476  665.20347611  665.6794391   388.29038768  356.47159407
  303.23884962  236.79840701  223.66311615  188.6178277    58.54030469] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 7
last5MinsDistances.max() = 388.290387681, last10PointsDistance.max() = 665.679439101
------------------------------2015-07-23 14:44:43------------------------------
last5MinsDistances = [ 374.62446807  342.59776861  289.78466252  222.67770022  212.39013835
  176.25033405   71.30798118   17.91461824] with length 8
last10PointsDistances = [ 654.96088955  655.39880044  374.62446807  342.59776861  289.78466252
  222.67770022  212.39013835  176.25033405   71.30798118   17.91461824] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 374.624468074, last10PointsDistance.max() = 655.398800436
------------------------------2015-07-23 14:45:13------------------------------
last5MinsDistances = [ 383.56124332  329.82626354  264.58913291  247.37616675  214.20732
   47.05899332   32.62993055   50.52858411] with length 8
last10PointsDistances = [ 686.53838755  415.00213316  383.56124332  329.82626354  264.58913291
  247.37616675  214.20732      47.05899332   32.62993055   50.52858411] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 383.561243319, last10PointsDistance.max() = 686.538387554
------------------------------2015-07-23 14:45:43------------------------------
last5MinsDistances = [ 386.86974197  320.87595548  305.26743521  271.59038715   96.30643294
   84.25343988   99.85382655   58.03950244] with length 8
last10PointsDistances = [ 472.01143329  440.35018577  386.86974197  320.87595548  305.26743521
  271.59038715   96.30643294   84.25343988   99.85382655   58.03950244] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 386.869741973, last10PointsDistance.max() = 472.011433294
------------------------------2015-07-23 14:46:13------------------------------
last5MinsDistances = [ 378.55573702  360.16765128  327.92211966  142.25524393  143.00441799
  159.16932144  113.97929815   59.6131848 ] with length 8
last10PointsDistances = [ 497.49847585  443.68715105  378.55573702  360.16765128  327.92211966
  142.25524393  143.00441799  159.16932144  113.97929815   59.6131848 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 378.555737016, last10PointsDistance.max() = 497.498475846
------------------------------2015-07-23 14:46:43------------------------------
last5MinsDistances = [ 356.54905732  323.86991032  140.032557    137.93656591  153.78816468
  109.68740859   53.95212131    7.79225085] with length 8
last10PointsDistances = [ 439.51251736  374.05248322  356.54905732  323.86991032  140.032557
  137.93656591  153.78816468  109.68740859   53.95212131    7.79225085] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 356.54905732, last10PointsDistance.max() = 439.512517357
------------------------------2015-07-23 14:47:13------------------------------
last5MinsDistances = [ 396.98972292  364.6451965   178.69335317  178.91329845  194.63913042
  150.55614672   94.79370014   36.82539806   41.00058666] with length 9
last10PointsDistances = [ 415.02312741  396.98972292  364.6451965   178.69335317  178.91329845
  194.63913042  150.55614672   94.79370014   36.82539806   41.00058666] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 396.989722919, last10PointsDistance.max() = 415.02312741
------------------------------2015-07-23 14:51:44------------------------------
last5MinsDistances = [ 2680.09598135] with length 1
last10PointsDistances = [ 2896.75906329  2860.24480007  2793.03796451  2743.25497521  2740.96359841
  2746.02110691  2709.02100291  2698.87466981  2694.80082195  2680.09598135] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 1
last5MinsDistances.max() = 2680.09598135, last10PointsDistance.max() = 2896.75906329
------------------------------2015-07-23 14:52:14------------------------------
last5MinsDistances = [ 650.26814635] with length 1
last10PointsDistances = [ 3465.56735333  3411.2556106   3359.52665079  3356.01592545  3364.47101875
  3330.45121894  3323.95313882  3319.48753625  3307.07179337   650.26814635] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 1
last5MinsDistances.max() = 650.268146349, last10PointsDistance.max() = 3465.56735333
------------------------------2015-07-23 15:04:29------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 7853.74830506  7806.08615835  7804.86318254  7806.70638135  7766.45190612
  7751.18992593  7747.75923121  7729.37265833  5070.95958103  4496.35045423] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-07-23 15:04:59------------------------------
last5MinsDistances = [ 379.82437934] with length 1
last10PointsDistances = [ 7784.53850507  7784.18626628  7783.57159943  7741.32701297  7723.26516275
  7720.18108997  7700.02021507  5067.13745969  4518.5050728    379.82437934] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 1
last5MinsDistances.max() = 379.824379345, last10PointsDistance.max() = 7784.53850507
------------------------------2015-07-23 15:05:29------------------------------
last5MinsDistances = [ 709.17880107  329.72063905] with length 2
last10PointsDistances = [ 7802.45627001  7799.70769742  7755.8143962   7735.35096312  7732.57473412
  7710.90793173  5107.93878119  4584.15226634   709.17880107   329.72063905] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 2
last5MinsDistances.max() = 709.178801072, last10PointsDistance.max() = 7802.45627001
------------------------------2015-07-23 15:05:59------------------------------
last5MinsDistances = [ 710.05675946  330.55665334    1.51931646] with length 3
last10PointsDistances = [ 7798.49901338  7754.60123216  7734.13121878  7731.35584318  7709.68496449
  5106.81375495  4583.11208136   710.05675946   330.55665334     1.51931646] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 710.056759457, last10PointsDistance.max() = 7798.49901338
------------------------------2015-07-23 15:06:29------------------------------
last5MinsDistances = [ 1132.74500028   752.9222475    424.55559365   423.57659794] with length 4
last10PointsDistances = [ 7743.82629536  7720.32464428  7717.9522758   7694.40451368  5140.48237817
  4652.02715418  1132.74500028   752.9222475    424.55559365   423.57659794] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 1132.74500028, last10PointsDistance.max() = 7743.82629536
------------------------------2015-07-23 15:13:29------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 14249.56608558  14251.49559301  14213.7001192   12522.77228897
  12344.16012637   9750.7285197    9405.26038004   9098.94300531
   9098.64864223   8730.12132661] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-07-23 15:13:59------------------------------
last5MinsDistances = [ 66.34032908] with length 1
last10PointsDistances = [ 14186.68777189  14148.87649148  12460.93870764  12283.61679815
   9702.58677258   9356.37477202   9049.4721812    9049.1705618
   8679.62302161     66.34032908] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 1
last5MinsDistances.max() = 66.3403290766, last10PointsDistance.max() = 14186.6877719
------------------------------2015-07-23 15:14:29------------------------------
last5MinsDistances = [ 124.15811039   60.10399318] with length 2
last10PointsDistances = [ 14089.60848613  12400.83754666  12223.56328869   9646.79062354
   9300.21964179   8993.04118605   8992.73615316   8622.72047721
    124.15811039     60.10399318] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 2
last5MinsDistances.max() = 124.158110389, last10PointsDistance.max() = 14089.6084861
------------------------------2015-07-23 15:15:00------------------------------
last5MinsDistances = [ 154.62754562   89.84876422   30.55307595] with length 3
last10PointsDistances = [ 12371.41939474  12194.602854     9622.76411791   9275.8869736
   8968.46881758   8968.16077638   8597.72701575    154.62754562
     89.84876422     30.55307595] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 154.62754562, last10PointsDistance.max() = 12371.4193947
------------------------------2015-07-23 15:15:30------------------------------
last5MinsDistances = [ 188.69265887  123.16565266   65.07681378   34.69317083] with length 4
last10PointsDistances = [ 12163.66843398   9598.90880832   9251.62300434   8943.88353698
   8943.57143099   8572.57250663    188.69265887    123.16565266
     65.07681378     34.69317083] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 188.692658874, last10PointsDistance.max() = 12163.668434
------------------------------2015-07-23 15:16:30------------------------------
last5MinsDistances = [ 297.05832289  233.15265466  173.26850105  143.33708357  111.64882713] with length 5
last10PointsDistances = [ 9493.54903078  9145.67355423  8837.48440326  8837.16664243  8465.40540639
   297.05832289   233.15265466   173.26850105   143.33708357   111.64882713] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 297.05832289, last10PointsDistance.max() = 9493.54903078
------------------------------2015-07-23 15:17:00------------------------------
last5MinsDistances = [ 314.04664545  250.03961869  190.20434155  160.20193232  128.19302871
   17.01838746] with length 6
last10PointsDistances = [ 9131.4121634   8823.10323362  8822.78394206  8450.81318172   314.04664545
   250.03961869   190.20434155   160.20193232   128.19302871    17.01838746] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 314.046645446, last10PointsDistance.max() = 9131.4121634
------------------------------2015-07-23 15:17:30------------------------------
last5MinsDistances = [ 298.78767473  232.45212729  177.68575473  147.91718822  113.47257723
   68.20841995   70.76630039] with length 7
last10PointsDistances = [ 8875.72761147  8875.40038198  8502.31396544   298.78767473   232.45212729
   177.68575473   147.91718822   113.47257723    68.20841995    70.76630039] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 7
last5MinsDistances.max() = 298.787674727, last10PointsDistance.max() = 8875.72761147
------------------------------2015-07-23 15:18:00------------------------------
last5MinsDistances = [ 282.97786964  219.16946099  159.24253017  129.38745251   98.05864832
   14.10861062   31.12699694   69.26681136] with length 8
last10PointsDistances = [ 8849.09321246  8477.50559775   282.97786964   219.16946099   159.24253017
   129.38745251    98.05864832    14.10861062    31.12699694    69.26681136] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 282.977869644, last10PointsDistance.max() = 8849.09321246
------------------------------2015-07-23 15:18:30------------------------------
last5MinsDistances = [ 250.11829489  197.32243309  168.21107662  134.3057805    88.97474136
   88.298878     24.37356893   91.95837046] with length 8
last10PointsDistances = [ 8500.80704294   316.37629293   250.11829489   197.32243309   168.21107662
   134.3057805     88.97474136    88.298878      24.37356893    91.95837046] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 250.118294888, last10PointsDistance.max() = 8500.80704294
------------------------------2015-07-23 15:19:00------------------------------
last5MinsDistances = [ 205.22611613  178.56648892  153.54051362   63.04339197   60.62988942
  130.23537842   68.26528923  148.87972234] with length 8
last10PointsDistances = [ 323.51973771  264.49296635  205.22611613  178.56648892  153.54051362
   63.04339197   60.62988942  130.23537842   68.26528923  148.87972234] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 205.226116125, last10PointsDistance.max() = 323.519737711
------------------------------2015-07-23 15:19:30------------------------------
last5MinsDistances = [ 314.51005795  305.78126471  251.23450186  250.59902484  319.39366998
  252.62317861  338.80586198  189.96916506] with length 8
last10PointsDistances = [ 375.17556472  329.0196404   314.51005795  305.78126471  251.23450186
  250.59902484  319.39366998  252.62317861  338.80586198  189.96916506] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 338.80586198, last10PointsDistance.max() = 375.175564715
------------------------------2015-07-23 15:20:00------------------------------
last5MinsDistances = [ 452.03694626  403.75623639  402.89154901  471.90940018  405.00657423
  491.16444765  342.28477832  152.52188313] with length 8
last10PointsDistances = [ 466.2846736   456.23678922  452.03694626  403.75623639  402.89154901
  471.90940018  405.00657423  491.16444765  342.28477832  152.52188313] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 491.164447654, last10PointsDistance.max() = 491.164447654
------------------------------2015-07-23 15:20:30------------------------------
last5MinsDistances = [ 549.49163695  548.95760146  617.68967694  550.32546487  637.1936793
  488.33229895  298.39438124  146.21125535] with length 8
last10PointsDistances = [ 593.36895271  592.24385248  549.49163695  548.95760146  617.68967694
  550.32546487  637.1936793   488.33229895  298.39438124  146.21125535] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 637.193679304, last10PointsDistance.max() = 637.193679304
------------------------------2015-07-23 15:21:00------------------------------
last5MinsDistances = [ 547.85450738  547.17547086  616.04071154  548.80940848  635.43504264
  486.55933083  296.67782657  144.3059616     4.97806979] with length 9
last10PointsDistances = [ 591.47933767  547.85450738  547.17547086  616.04071154  548.80940848
  635.43504264  486.55933083  296.67782657  144.3059616     4.97806979] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 635.435042641, last10PointsDistance.max() = 635.435042641
------------------------------2015-07-23 15:21:30------------------------------
last5MinsDistances = [ 767.52375797  836.04031428  768.3654602   855.72560275  706.89411403
  516.92713342  364.85107733  218.64198976  220.63501653] with length 9
last10PointsDistances = [ 767.83191538  767.52375797  836.04031428  768.3654602   855.72560275
  706.89411403  516.92713342  364.85107733  218.64198976  220.63501653] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 855.725602751, last10PointsDistance.max() = 855.725602751
------------------------------2015-07-23 15:22:00------------------------------
last5MinsDistances = [ 921.37824427  852.80254001  941.9982334   793.83234867  604.55802382
  454.89567381  310.46098602  313.28939074  105.04911365] with length 9
last10PointsDistances = [ 854.30060252  921.37824427  852.80254001  941.9982334   793.83234867
  604.55802382  454.89567381  310.46098602  313.28939074  105.04911365] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 941.998233396, last10PointsDistance.max() = 941.998233396
------------------------------2015-07-23 15:22:30------------------------------
last5MinsDistances = [ 1023.8615257   1115.60840703   972.42015363   790.68211121   652.79683134
   520.81882605   524.75934878   346.66695699   244.82531905] with length 9
last10PointsDistances = [ 1093.07453584  1023.8615257   1115.60840703   972.42015363   790.68211121
   652.79683134   520.81882605   524.75934878   346.66695699   244.82531905] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 1115.60840703, last10PointsDistance.max() = 1115.60840703
------------------------------2015-07-23 15:23:00------------------------------
last5MinsDistances = [ 1223.34425894  1080.35707111   898.62553919   760.10227686   626.45938522
   630.27646591   442.70647521   338.11133513   107.98805764] with length 9
last10PointsDistances = [ 1131.55693792  1223.34425894  1080.35707111   898.62553919   760.10227686
   626.45938522   630.27646591   442.70647521   338.11133513   107.98805764] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 1223.34425894, last10PointsDistance.max() = 1223.34425894
------------------------------2015-07-23 15:23:30------------------------------
last5MinsDistances = [ 1266.25527435  1088.69667731   954.67804492   824.69822622   828.67423201
   644.43712712   539.76721726   303.99616863   201.73918457] with length 9
last10PointsDistances = [ 1406.19272228  1266.25527435  1088.69667731   954.67804492   824.69822622
   828.67423201   644.43712712   539.76721726   303.99616863   201.73918457] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 1266.25527435, last10PointsDistance.max() = 1406.19272228
------------------------------2015-07-23 15:24:00------------------------------
last5MinsDistances = [ 1192.76061559  1061.33603786   933.50880209   937.56890762   755.90259103
   651.33270217   413.71539026   313.22566165   111.72528078] with length 9
last10PointsDistances = [ 1367.79976122  1192.76061559  1061.33603786   933.50880209   937.56890762
   755.90259103   651.33270217   413.71539026   313.22566165   111.72528078] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 1192.76061559, last10PointsDistance.max() = 1367.79976122
------------------------------2015-07-23 15:24:26------------------------------
last5MinsDistances = [ 1214.58632731  1083.74201171   956.40437885   960.48282986   779.452657
   674.91744424   436.91165851   336.80611196   135.39482365    23.6924522 ] with length 10
last10PointsDistances = [ 1214.58632731  1083.74201171   956.40437885   960.48282986   779.452657
   674.91744424   436.91165851   336.80611196   135.39482365    23.6924522 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
last5MinsDistances.max() = 1214.58632731, last10PointsDistance.max() = 1214.58632731
------------------------------2015-07-23 15:25:00------------------------------
last5MinsDistances = [ 1108.16994273  1112.38042333   936.68346138   832.55132286   591.8964949
   494.76582274   294.50364552   183.29203097   159.6725469 ] with length 9
last10PointsDistances = [ 1231.73656131  1108.16994273  1112.38042333   936.68346138   832.55132286
   591.8964949    494.76582274   294.50364552   183.29203097   159.6725469 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 1112.38042333, last10PointsDistance.max() = 1231.73656131
------------------------------2015-07-23 15:25:31------------------------------
last5MinsDistances = [ 1195.52409414  1026.85196607   923.56831667   680.47598497   587.48207608
   390.34025638   281.17915734   258.02844242   102.35479553] with length 9
last10PointsDistances = [ 1191.18139563  1195.52409414  1026.85196607   923.56831667   680.47598497
   587.48207608   390.34025638   281.17915734   258.02844242   102.35479553] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 1195.52409414, last10PointsDistance.max() = 1195.52409414
------------------------------2015-07-23 15:26:01------------------------------
last5MinsDistances = [ 1144.15714122  1042.58422752   797.86116149   711.16105332   520.13125196
   414.84970775   392.55492824   242.51687526   140.87361613] with length 9
last10PointsDistances = [ 1301.94611233  1144.15714122  1042.58422752   797.86116149   711.16105332
   520.13125196   414.84970775   392.55492824   242.51687526   140.87361613] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 1144.15714122, last10PointsDistance.max() = 1301.94611233
------------------------------2015-07-23 15:26:31------------------------------
last5MinsDistances = [ 1167.81884685   923.18623382   841.57873296   655.77869942   553.32744543
   531.58990045   384.30300302   282.81504884   141.94272553] with length 9
last10PointsDistances = [ 1267.62268761  1167.81884685   923.18623382   841.57873296   655.77869942
   553.32744543   531.58990045   384.30300302   282.81504884   141.94272553] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 1167.81884685, last10PointsDistance.max() = 1267.62268761
------------------------------2015-07-23 15:27:01------------------------------
last5MinsDistances = [ 1030.42642891   951.07879566   767.26128913   665.50327698   643.84977392
   496.26560469   394.43724804   253.74882561   112.34464082] with length 9
last10PointsDistances = [ 1274.63526651  1030.42642891   951.07879566   767.26128913   665.50327698
   643.84977392   496.26560469   394.43724804   253.74882561   112.34464082] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 1030.42642891, last10PointsDistance.max() = 1274.63526651
------------------------------2015-07-23 15:27:31------------------------------
last5MinsDistances = [ 1114.25825887   935.07077904   835.5176407    814.2725563    668.67708111
   567.06610259   426.24616427   284.37422897   172.82015033] with length 9
last10PointsDistances = [ 1189.17202857  1114.25825887   935.07077904   835.5176407    814.2725563
   668.67708111   567.06610259   426.24616427   284.37422897   172.82015033] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 1114.25825887, last10PointsDistance.max() = 1189.17202857
------------------------------2015-07-23 15:28:01------------------------------
last5MinsDistances = [ 966.69825396  869.37649373  848.6106622   706.20759499  605.3714694
  464.58863629  322.87184833  213.89319027   50.1997126 ] with length 9
last10PointsDistances = [ 1142.13352764   966.69825396   869.37649373   848.6106622    706.20759499
   605.3714694    464.58863629   322.87184833   213.89319027    50.1997126 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 966.698253963, last10PointsDistance.max() = 1142.13352764
------------------------------2015-07-23 15:28:31------------------------------
last5MinsDistances = [ 888.42867952  867.49897868  723.86254188  622.66286744  481.79403679
  339.87522665  229.48096036   58.60319385   22.79753866] with length 9
last10PointsDistances = [ 986.45052904  888.42867952  867.49897868  723.86254188  622.66286744
  481.79403679  339.87522665  229.48096036   58.60319385   22.79753866] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 888.42867952, last10PointsDistance.max() = 986.450529044
------------------------------2015-07-23 15:29:01------------------------------
last5MinsDistances = [ 874.14255372  733.96470911  633.75821545  493.28026785  352.16187767
  245.24850313   85.79298712   35.59438855   38.60542276] with length 9
last10PointsDistances = [ 894.57305868  874.14255372  733.96470911  633.75821545  493.28026785
  352.16187767  245.24850313   85.79298712   35.59438855   38.60542276] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 874.142553715, last10PointsDistance.max() = 894.573058677
------------------------------2015-07-23 15:29:31------------------------------
last5MinsDistances = [ 684.14773041  587.62409047  450.88264906  317.12593472  228.256624
  137.4664177   109.0376934   128.54697562  100.2371556 ] with length 9
last10PointsDistances = [ 815.18954593  684.14773041  587.62409047  450.88264906  317.12593472
  228.256624    137.4664177   109.0376934   128.54697562  100.2371556 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 684.147730405, last10PointsDistance.max() = 815.189545926
------------------------------2015-07-23 15:30:01------------------------------
last5MinsDistances = [ 637.27397769  497.36346368  357.31924345  253.38381612  103.78438319
   54.848946     62.21963388   23.88510708   83.0160174 ] with length 9
last10PointsDistances = [ 736.69785545  637.27397769  497.36346368  357.31924345  253.38381612
  103.78438319   54.848946     62.21963388   23.88510708   83.0160174 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 637.273977688, last10PointsDistance.max() = 736.697855449
------------------------------2015-07-23 15:30:31------------------------------
last5MinsDistances = [ 490.70942794  349.15524812  240.72882127   76.03712111   27.13256942
   24.52302584   14.31973281  111.35413668   38.19502804] with length 9
last10PointsDistances = [ 631.40924031  490.70942794  349.15524812  240.72882127   76.03712111
   27.13256942   24.52302584   14.31973281  111.35413668   38.19502804] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 490.709427943, last10PointsDistance.max() = 631.409240313
------------------------------2015-07-23 15:31:01------------------------------
last5MinsDistances = [ 489.85564194  348.43370103  240.51715348   77.78883291   27.98146939
   28.75168593    9.8577087   106.6795506    33.57997438    4.89385955] with length 10
last10PointsDistances = [ 489.85564194  348.43370103  240.51715348   77.78883291   27.98146939
   28.75168593    9.8577087   106.6795506    33.57997438    4.89385955] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
last5MinsDistances.max() = 489.855641937, last10PointsDistance.max() = 489.855641937
------------------------------2015-07-23 15:31:31------------------------------
last5MinsDistances = [ 367.50548415  258.45895865   90.47358071   44.65621165   32.79073953
   25.28361942  125.35154001   45.20883932   19.21779782   21.8530287 ] with length 10
last10PointsDistances = [ 367.50548415  258.45895865   90.47358071   44.65621165   32.79073953
   25.28361942  125.35154001   45.20883932   19.21779782   21.8530287 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
last5MinsDistances.max() = 367.505484147, last10PointsDistance.max() = 367.505484147
------------------------------2015-07-23 15:33:01------------------------------
last5MinsDistances = [ 137.18797106  132.08197977  218.94197404  138.88263981  130.62238265
  132.57875529  111.46047733] with length 7
last10PointsDistances = [ 366.45106699  194.01515039  155.19282502  137.18797106  132.08197977
  218.94197404  138.88263981  130.62238265  132.57875529  111.46047733] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 7
last5MinsDistances.max() = 218.941974036, last10PointsDistance.max() = 366.451066988
------------------------------2015-07-23 15:34:01------------------------------
last5MinsDistances = [ 115.05898537   45.38836069    8.06211654   11.92164633   23.3542887
  134.23448398] with length 6
last10PointsDistances = [  68.69475666   21.30243085   16.84651917   21.7792095   115.05898537
   45.38836069    8.06211654   11.92164633   23.3542887   134.23448398] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 134.234483982, last10PointsDistance.max() = 134.234483982
------------------------------2015-07-23 15:34:23------------------------------
last5MinsDistances = [ 147.3085924    64.84831839   43.43183321   46.29287442   24.43991415
   88.29700713   46.10709225] with length 7
last10PointsDistances = [  66.90580329   49.79821471   48.77036452  147.3085924    64.84831839
   43.43183321   46.29287442   24.43991415   88.29700713   46.10709225] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 7
last5MinsDistances.max() = 147.308592398, last10PointsDistance.max() = 147.308592398
------------------------------2015-07-23 15:37:31------------------------------
last5MinsDistances = [ 220.74882416  353.21869052  308.1414087 ] with length 3
last10PointsDistances = [ 357.64238792  347.23382792  415.68563478  347.38353664  348.59864264
  349.74927586  329.93507475  220.74882416  353.21869052  308.1414087 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 353.218690521, last10PointsDistance.max() = 415.685634783
------------------------------2015-07-23 15:37:55------------------------------
last5MinsDistances = [  74.45048171  204.73603094  159.98051703  148.54837097] with length 4
last10PointsDistances = [ 198.86459295  273.16658262  200.28499103  200.05215522  201.21332429
  181.42725326   74.45048171  204.73603094  159.98051703  148.54837097] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 204.736030939, last10PointsDistance.max() = 273.166582622
------------------------------2015-07-23 15:38:27------------------------------
last5MinsDistances = [ 247.02914731  202.70506309  107.40132726   43.14963067] with length 4
last10PointsDistances = [ 309.45365862  239.9829251   242.07887467  243.01828643  223.68040115
  117.57480905  247.02914731  202.70506309  107.40132726   43.14963067] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 247.029147314, last10PointsDistance.max() = 309.453658625
------------------------------2015-07-23 15:39:07------------------------------
last5MinsDistances = [ 542.57051698  237.11397106  382.7602756   339.86982498] with length 4
last10PointsDistances = [ 575.48200421  581.36249277  582.01738561  563.24553341  456.54399389
  586.5963321   542.57051698  237.11397106  382.7602756   339.86982498] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 542.570516976, last10PointsDistance.max() = 586.596332096
------------------------------2015-07-23 15:40:26------------------------------
last5MinsDistances = [ 1061.83850679  1150.86424515  1133.28493557  1008.93845955] with length 4
last10PointsDistances = [ 1287.30563936  1291.39848971  1270.71151257  1181.42998247  1286.06021995
  1247.59506442  1061.83850679  1150.86424515  1133.28493557  1008.93845955] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 1150.86424515, last10PointsDistance.max() = 1291.39848971
------------------------------2015-07-23 15:41:30------------------------------
last5MinsDistances = [ 1908.94310489  1996.11704012  1979.75067812  1842.61485433   847.18611034] with length 5
last10PointsDistances = [ 2127.61265408  2107.56618223  2023.26964784  2121.40138063  2085.15578016
  1908.94310489  1996.11704012  1979.75067812  1842.61485433   847.18611034] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 1996.11704012, last10PointsDistance.max() = 2127.61265408
------------------------------2015-07-23 15:42:02------------------------------
last5MinsDistances = [ 2716.27121309  2815.18138985  2795.13632842  2620.49084222  1667.06140714
   846.89719852] with length 6
last10PointsDistances = [ 2937.58386771  2848.14693184  2952.63356305  2914.55817754  2716.27121309
  2815.18138985  2795.13632842  2620.49084222  1667.06140714   846.89719852] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 2815.18138985, last10PointsDistance.max() = 2952.63356305
------------------------------2015-07-23 15:42:34------------------------------
last5MinsDistances = [ 3635.95481255  3614.30007964  3423.07584636  2492.52623844  1677.79916985
   831.16569642] with length 6
last10PointsDistances = [ 3671.44000649  3778.53503483  3739.71971991  3532.04076137  3635.95481255
  3614.30007964  3423.07584636  2492.52623844  1677.79916985   831.16569642] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 3635.95481255, last10PointsDistance.max() = 3778.53503483
------------------------------2015-07-23 15:51:42------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 16261.441365    16220.45942271  15986.73329078  16103.97814212
  16077.76753949  15843.50658955  14982.1790294   14181.25815621
  13334.47747587  12503.46106627] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-07-23 15:54:13------------------------------
last5MinsDistances = [ 3138.4479454] with length 1
last10PointsDistances = [ 18907.57949611  18693.35306691  18801.71511995  18778.76829754
  18567.97259651  17660.39736718  16835.04294684  15995.05497484
  15167.89997016   3138.4479454 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 1
last5MinsDistances.max() = 3138.4479454, last10PointsDistance.max() = 18907.5794961
------------------------------2015-07-23 15:55:13------------------------------
last5MinsDistances = [ 4081.50738954   953.69443496] with length 2
last10PointsDistances = [ 19457.09818632  19562.36641846  19540.52515878  19337.77625576
  18417.00338938  17585.76479942  16750.05341683  15926.41309395
   4081.50738954    953.69443496] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 2
last5MinsDistances.max() = 4081.50738954, last10PointsDistance.max() = 19562.3664185
------------------------------2015-07-23 15:55:32------------------------------
last5MinsDistances = [ 4075.77474992   946.83370015    10.86377662] with length 3
last10PointsDistances = [ 19561.76924832  19539.90734625  19337.00633965  18416.47064796
  17585.33087444  16749.53290193  15925.81863203   4075.77474992
    946.83370015     10.86377662] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 4075.77474992, last10PointsDistance.max() = 19561.7692483
------------------------------2015-07-23 15:56:04------------------------------
last5MinsDistances = [ 4075.24886494   946.9280771      7.61298943     4.91773544] with length 4
last10PointsDistances = [ 19537.1072702   19334.26325351  18413.63891067  17582.46260881
  16746.69656155  15923.00969904   4075.24886494    946.9280771
      7.61298943      4.91773544] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 4075.24886494, last10PointsDistance.max() = 19537.1072702
------------------------------2015-07-23 15:56:36------------------------------
last5MinsDistances = [ 4090.26109451   965.80110995    26.14534223    36.82599463    32.61681235] with length 5
last10PointsDistances = [ 19333.9535052   18412.61707652  17581.14517521  16745.64061198
  15922.17751337   4090.26109451    965.80110995     26.14534223
     36.82599463     32.61681235] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 4090.26109451, last10PointsDistance.max() = 19333.9535052
------------------------------2015-07-23 15:57:13------------------------------
last5MinsDistances = [ 1038.12028512   119.45633569   130.30582486   126.62223351    94.53520995] with length 5
last10PointsDistances = [ 18429.6598234   17597.35935475  16762.61763367  15939.81007048
   4151.15028353   1038.12028512    119.45633569    130.30582486
    126.62223351     94.53520995] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 1038.12028512, last10PointsDistance.max() = 18429.6598234
------------------------------2015-07-23 15:59:13------------------------------
last5MinsDistances = [ 3720.31013907  3729.80309177  3727.88523635  3700.81804789  3613.38505134] with length 5
last10PointsDistances = [ 19782.71041836  18980.64846939  18187.87428486   7554.68987109
   4621.13530907   3720.31013907   3729.80309177   3727.88523635
   3700.81804789   3613.38505134] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 3729.80309177, last10PointsDistance.max() = 19782.7104184
------------------------------2015-07-23 15:59:43------------------------------
last5MinsDistances = [ 4319.40119584  4328.88435508  4326.97494073  4299.93407995  4212.51648636
   599.13234084] with length 6
last10PointsDistances = [ 19388.20665633  18601.4459699    8136.2782494    5219.21914239
   4319.40119584   4328.88435508   4326.97494073   4299.93407995
   4212.51648636    599.13234084] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 4328.88435508, last10PointsDistance.max() = 19388.2066563
------------------------------2015-07-23 16:00:13------------------------------
last5MinsDistances = [ 4328.56623571  4326.65794199  4299.62161046  4212.21309201   598.82804251
     1.11621816] with length 6
last10PointsDistances = [ 18602.00080544   8136.22987496   5218.97421115   4319.08438846
   4328.56623571   4326.65794199   4299.62161046   4212.21309201
    598.82804251      1.11621816] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 4328.56623571, last10PointsDistance.max() = 18602.0008054
------------------------------2015-07-23 16:00:43------------------------------
last5MinsDistances = [ 4326.87198312  4299.83208171  4212.41641212   599.03193676     0.24894892
     0.87032394] with length 6
last10PointsDistances = [ 8136.23325859  5219.13153068  4319.29827872  4328.78116018  4326.87198312
  4299.83208171  4212.41641212   599.03193676     0.24894892     0.87032394] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 4326.87198312, last10PointsDistance.max() = 8136.23325859
------------------------------2015-07-23 16:01:13------------------------------
last5MinsDistances = [ 4378.25253687  4290.53661192   678.03832918    86.04907596    86.78506751
    86.23682257] with length 6
last10PointsDistances = [ 5295.14693237  4397.86143918  4407.38715085  4405.44118759  4378.25253687
  4290.53661192   678.03832918    86.04907596    86.78506751    86.23682257] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 4378.25253687, last10PointsDistance.max() = 5295.14693237
------------------------------2015-07-23 16:02:43------------------------------
last5MinsDistances = [ 2041.92095598  1443.50984785  1443.87760943  1443.62342975  1363.9633268 ] with length 5
last10PointsDistances = [ 5761.6917875   5771.23644931  5769.27415571  5742.00944168  5654.09255938
  2041.92095598  1443.50984785  1443.87760943  1443.62342975  1363.9633268 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 2041.92095598, last10PointsDistance.max() = 5771.23644931
------------------------------2015-07-23 16:03:13------------------------------
last5MinsDistances = [ 2419.46934645  1820.42566347  1820.70989125  1820.52158815  1743.65729927
   397.65436877] with length 6
last10PointsDistances = [ 6148.65579027  6146.78863016  6119.9046065   6032.73109962  2419.46934645
  1820.42566347  1820.70989125  1820.52158815  1743.65729927   397.65436877] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 2419.46934645, last10PointsDistance.max() = 6148.65579027
------------------------------2015-07-23 16:04:13------------------------------
last5MinsDistances = [ 2263.49413817  2263.71763963  2263.57709386  2188.96192214   854.97272367
   457.32477589] with length 6
last10PointsDistances = [ 6584.88116698  6558.38268579  6471.97507975  2861.27105682  2263.49413817
  2263.71763963  2263.57709386  2188.96192214   854.97272367   457.32477589] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 2263.71763963, last10PointsDistance.max() = 6584.88116698
------------------------------2015-07-23 16:04:43------------------------------
last5MinsDistances = [ 2264.01070432  2263.87027637  2189.26107981   855.32843283   457.67965776
     0.42702106] with length 6
last10PointsDistances = [ 6558.65868534  6472.25299254  2861.55931738  2263.78735287  2264.01070432
  2263.87027637  2189.26107981   855.32843283   457.67965776     0.42702106] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 2264.01070432, last10PointsDistance.max() = 6558.65868534
------------------------------2015-07-23 16:05:13------------------------------
last5MinsDistances = [ 2261.56054287  2187.16602727   855.60380796   457.98107712    11.46538353
    11.21742361] with length 6
last10PointsDistances = [ 6469.40035182  2859.07136725  2261.47875913  2261.69680262  2261.56054287
  2187.16602727   855.60380796   457.98107712    11.46538353    11.21742361] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 2261.56054287, last10PointsDistance.max() = 6469.40035182
------------------------------2015-07-23 16:05:43------------------------------
last5MinsDistances = [ 2624.81123842  1277.56337202   883.85598608   438.75754252   438.49927213
   442.12973508] with length 6
last10PointsDistances = [ 3298.4523942   2700.15378188  2700.39616311  2700.24079174  2624.81123842
  1277.56337202   883.85598608   438.75754252   438.49927213   442.12973508] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 2624.81123842, last10PointsDistance.max() = 3298.4523942
------------------------------2015-07-23 16:06:13------------------------------
last5MinsDistances = [ 1945.01282638  1547.56286819  1090.8582045   1090.48935685  1089.69559932
   705.80857876] with length 6
last10PointsDistances = [ 3324.31803209  3324.43925049  3324.37889868  3253.98356602  1945.01282638
  1547.56286819  1090.8582045   1090.48935685  1089.69559932   705.80857876] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 1945.01282638, last10PointsDistance.max() = 3324.43925049
------------------------------2015-07-23 16:10:14------------------------------
last5MinsDistances = [ 3835.08091411  3136.74158057] with length 2
last10PointsDistances = [ 6401.21754328  6401.27229649  6337.88956521  5075.15647827  4679.37959891
  4225.06304693  4224.68218548  4223.18860089  3835.08091411  3136.74158057] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 2
last5MinsDistances.max() = 3835.08091411, last10PointsDistance.max() = 6401.27229649
------------------------------2015-07-23 16:10:44------------------------------
last5MinsDistances = [ 3661.74406168   526.56016412] with length 2
last10PointsDistances = [ 6927.03906095  6863.89128088  5601.275281    5205.32583049  4750.70263584
  4750.32312463  4748.90514774  4358.70461068  3661.74406168   526.56016412] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 2
last5MinsDistances.max() = 3661.74406168, last10PointsDistance.max() = 6927.03906095
------------------------------2015-07-23 16:11:14------------------------------
last5MinsDistances = [ 1277.96119123   754.23244416] with length 2
last10PointsDistances = [ 7615.31708162  6345.4461732   5948.79229945  5493.09370064  5492.71941867
  5491.59010101  5095.34615163  4402.68673958  1277.96119123   754.23244416] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 2
last5MinsDistances.max() = 1277.96119123, last10PointsDistance.max() = 7615.31708162
------------------------------2015-07-23 16:11:44------------------------------
last5MinsDistances = [ 1944.17601842  1422.57677049   668.86938398] with length 3
last10PointsDistances = [ 7001.26444961  6604.11540737  6147.66545612  6147.29614456  6146.43008863
  5745.16687847  5056.81011719  1944.17601842  1422.57677049   668.86938398] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 1944.17601842, last10PointsDistance.max() = 7001.26444961
------------------------------2015-07-23 16:12:14------------------------------
last5MinsDistances = [ 2496.88817956  1973.2118965   1219.16284058   555.30884902] with length 4
last10PointsDistances = [ 7159.40207586  6702.926207    6702.55713944  6701.70294368  6300.00476716
  5612.06857847  2496.88817956  1973.2118965   1219.16284058   555.30884902] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 2496.88817956, last10PointsDistance.max() = 7159.40207586
------------------------------2015-07-23 16:12:44------------------------------
last5MinsDistances = [ 2507.85198908  1984.22744693  1230.15761354   566.05100272    11.18613347] with length 5
last10PointsDistances = [ 6713.61983873  6713.25087632  6712.40213912  6310.60699225  5622.76176666
  2507.85198908  1984.22744693  1230.15761354   566.05100272    11.18613347] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 2507.85198908, last10PointsDistance.max() = 6713.61983873
------------------------------2015-07-23 16:13:14------------------------------
last5MinsDistances = [ 2495.97839785  1972.32949894  1218.26875089   554.31014016     1.4201119
    11.92685266] with length 6
last10PointsDistances = [ 6701.54498407  6700.69245223  6298.96632491  5611.0562235   2495.97839785
  1972.32949894  1218.26875089   554.31014016     1.4201119     11.92685266] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 2495.97839785, last10PointsDistance.max() = 6701.54498407
------------------------------2015-07-23 16:13:44------------------------------
last5MinsDistances = [ 2502.60047808  1978.91375552  1224.86967557   561.03033358     5.72309326
     5.84830125     6.77746547] with length 7
last10PointsDistances = [ 6707.42258739  6305.71645781  5617.78783859  2502.60047808  1978.91375552
  1224.86967557   561.03033358     5.72309326     5.84830125     6.77746547] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 7
last5MinsDistances.max() = 2502.60047808, last10PointsDistance.max() = 6707.42258739
------------------------------2015-07-23 16:14:14------------------------------
last5MinsDistances = [ 2933.49155893  2409.6815532   1655.72238316   991.07911615   436.6047288
   425.65390392   437.51903552   430.8916591 ] with length 8
last10PointsDistances = [ 6733.57550718  6046.8300721   2933.49155893  2409.6815532   1655.72238316
   991.07911615   436.6047288    425.65390392   437.51903552   430.8916591 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 2933.49155893, last10PointsDistance.max() = 6733.57550718
------------------------------2015-07-23 16:14:44------------------------------
last5MinsDistances = [ 3520.9905149   2998.19952471  2243.98165404  1576.91942057  1025.40002154
  1014.32515398  1026.24394327  1019.71918556   590.2757479 ] with length 9
last10PointsDistances = [ 6626.67733486  3520.9905149   2998.19952471  2243.98165404  1576.91942057
  1025.40002154  1014.32515398  1026.24394327  1019.71918556   590.2757479 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 3520.9905149, last10PointsDistance.max() = 6626.67733486
------------------------------2015-07-23 16:15:14------------------------------
last5MinsDistances = [ 3853.18337134  3099.26480524  2433.58958727  1880.1189704   1869.14145463
  1881.02133784  1874.40945398  1443.54258987   857.81716055] with length 9
last10PointsDistances = [ 4376.97864847  3853.18337134  3099.26480524  2433.58958727  1880.1189704
  1869.14145463  1881.02133784  1874.40945398  1443.54258987   857.81716055] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 3853.18337134, last10PointsDistance.max() = 4376.97864847
------------------------------2015-07-23 16:15:39------------------------------
last5MinsDistances = [ 3888.71305666  3134.84882706  2469.36014994  1915.7314176   1904.7631696
  1916.63844343  1910.02027081  1479.13594965   893.87363035    36.51949655] with length 10
last10PointsDistances = [ 3888.71305666  3134.84882706  2469.36014994  1915.7314176   1904.7631696
  1916.63844343  1910.02027081  1479.13594965   893.87363035    36.51949655] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
last5MinsDistances.max() = 3888.71305666, last10PointsDistance.max() = 3888.71305666
------------------------------2015-07-23 16:16:11------------------------------
last5MinsDistances = [ 3204.54928624  2539.17333409  1985.45740873  1974.49502413  1986.36733081
  1979.74529502  1548.85529861   963.78926568   106.1850142     69.91930232] with length 10
last10PointsDistances = [ 3204.54928624  2539.17333409  1985.45740873  1974.49502413  1986.36733081
  1979.74529502  1548.85529861   963.78926568   106.1850142     69.91930232] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
last5MinsDistances.max() = 3204.54928624, last10PointsDistance.max() = 3204.54928624
------------------------------2015-07-23 16:16:43------------------------------
last5MinsDistances = [ 2554.47046971  2000.47634306  1989.53194605  2001.39485461  1994.76160218
  1563.87818021   979.8272946    123.74785907    87.23556363    21.7705805 ] with length 10
last10PointsDistances = [ 2554.47046971  2000.47634306  1989.53194605  2001.39485461  1994.76160218
  1563.87818021   979.8272946    123.74785907    87.23556363    21.7705805 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
last5MinsDistances.max() = 2554.47046971, last10PointsDistance.max() = 2554.47046971
------------------------------2015-07-23 16:17:47------------------------------
last5MinsDistances = [ 2625.6689151   2619.00598448  2188.31853586  1606.10497015   749.23129761
   712.88148589   643.0464327    626.39066151] with length 8
last10PointsDistances = [ 2624.72625509  2613.83664061  2625.6689151   2619.00598448  2188.31853586
  1606.10497015   749.23129761   712.88148589   643.0464327    626.39066151] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 2625.6689151, last10PointsDistance.max() = 2625.6689151
------------------------------2015-07-23 16:18:18------------------------------
last5MinsDistances = [ 3236.49448197  2805.64140515  2220.93549219  1363.15009661  1327.19540376
  1257.31627638  1241.85969863   619.17426365] with length 8
last10PointsDistances = [ 3231.28258413  3243.13709703  3236.49448197  2805.64140515  2220.93549219
  1363.15009661  1327.19540376  1257.31627638  1241.85969863   619.17426365] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 3236.49448197, last10PointsDistance.max() = 3243.13709703
------------------------------2015-07-23 16:18:34------------------------------
last5MinsDistances = [ 3743.7043073   3312.88686814  2728.44252652  1870.64991005  1834.67922633
  1764.79218715  1749.24934998  1125.19560305   507.50840072] with length 9
last10PointsDistances = [ 3750.3535235   3743.7043073   3312.88686814  2728.44252652  1870.64991005
  1834.67922633  1764.79218715  1749.24934998  1125.19560305   507.50840072] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 3743.7043073, last10PointsDistance.max() = 3750.3535235
------------------------------2015-07-23 16:19:06------------------------------
last5MinsDistances = [ 4215.40226164  3628.56100222  2771.88165924  2736.26773384  2666.57296021
  2651.79387313  2030.98530806  1411.81208607   908.33864045] with length 9
last10PointsDistances = [ 4646.28218379  4215.40226164  3628.56100222  2771.88165924  2736.26773384
  2666.57296021  2651.79387313  2030.98530806  1411.81208607   908.33864045] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 4215.40226164, last10PointsDistance.max() = 4646.28218379
------------------------------2015-07-23 16:19:38------------------------------
last5MinsDistances = [ 4162.54910724  3307.05694261  3271.64350777  3202.09992463  3187.69539567
  2568.87251623  1949.84817669  1447.98852409   539.96155456] with length 9
last10PointsDistances = [ 4750.45624594  4162.54910724  3307.05694261  3271.64350777  3202.09992463
  3187.69539567  2568.87251623  1949.84817669  1447.98852409   539.96155456] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 4162.54910724, last10PointsDistance.max() = 4750.45624594
------------------------------2015-07-23 16:20:10------------------------------
last5MinsDistances = [ 3616.24996404  3580.8569709   3511.32873875  3496.95362259  2878.13993052
  2259.085688    1756.71781432   848.39566223   309.3031102 ] with length 9
last10PointsDistances = [ 4471.56188505  3616.24996404  3580.8569709   3511.32873875  3496.95362259
  2878.13993052  2259.085688    1756.71781432   848.39566223   309.3031102 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 3616.24996404, last10PointsDistance.max() = 4471.56188505
------------------------------2015-07-23 16:20:39------------------------------
last5MinsDistances = [ 3515.74061334  3501.36267879  2882.52813193  2263.47028816  1761.0717871
   852.74570959   313.70227591     4.45170726] with length 8
last10PointsDistances = [ 3620.66451289  3585.27007166  3515.74061334  3501.36267879  2882.52813193
  2263.47028816  1761.0717871    852.74570959   313.70227591     4.45170726] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 3515.74061334, last10PointsDistance.max() = 3620.66451289
------------------------------2015-07-23 16:21:11------------------------------
last5MinsDistances = [ 3522.40079828  3508.10923888  2889.84592375  2270.88954875  1769.16148604
   861.00134567   321.19165875    21.06661523    19.68941424] with length 9
last10PointsDistances = [ 3591.89085265  3522.40079828  3508.10923888  2889.84592375  2270.88954875
  1769.16148604   861.00134567   321.19165875    21.06661523    19.68941424] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 3522.40079828, last10PointsDistance.max() = 3591.89085265
------------------------------2015-07-23 16:21:43------------------------------
last5MinsDistances = [ 2953.61900314  2334.50891053  1831.61719137   923.30091681   385.14669705
    76.68414717    72.23270598    71.04531186] with length 8
last10PointsDistances = [ 3587.22992797  3572.8036201   2953.61900314  2334.50891053  1831.61719137
   923.30091681   385.14669705    76.68414717    72.23270598    71.04531186] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 2953.61900314, last10PointsDistance.max() = 3587.22992797
------------------------------2015-07-23 16:21:59------------------------------
last5MinsDistances = [ 3352.31254092  2733.4575423   2231.93840302  1323.72587983   783.97048514
   475.52885463   471.21769979   462.78115403   401.93847743] with length 9
last10PointsDistances = [ 3969.85138791  3352.31254092  2733.4575423   2231.93840302  1323.72587983
   783.97048514   475.52885463   471.21769979   462.78115403   401.93847743] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 3352.31254092, last10PointsDistance.max() = 3969.85138791
------------------------------2015-07-23 16:22:45------------------------------
last5MinsDistances = [ 3657.75741538  3038.91938417  2537.31712006  1629.04578027  1089.39427708
   780.6877727    776.3522159    768.20416923   706.41459889   305.46661639] with length 10
last10PointsDistances = [ 3657.75741538  3038.91938417  2537.31712006  1629.04578027  1089.39427708
   780.6877727    776.3522159    768.20416923   706.41459889   305.46661639] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
last5MinsDistances.max() = 3657.75741538, last10PointsDistance.max() = 3657.75741538
------------------------------2015-07-23 16:23:15------------------------------
last5MinsDistances = [ 4557.71364163  4056.06714642  3147.73721193  2608.24449925  2299.3495011
  2294.99541982  2287.0616857   2224.58042528  1824.32865872  1518.86783967] with length 10
last10PointsDistances = [ 4557.71364163  4056.06714642  3147.73721193  2608.24449925  2299.3495011
  2294.99541982  2287.0616857   2224.58042528  1824.32865872  1518.86783967] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
last5MinsDistances.max() = 4557.71364163, last10PointsDistance.max() = 4557.71364163
------------------------------2015-07-23 16:23:45------------------------------
last5MinsDistances = [ 4026.67046229  3487.12009823  3178.27713586  3173.92526444  3165.93014495
  3103.53201349  2703.16800011  2397.72601564   878.95206982] with length 9
last10PointsDistances = [ 4934.9930312   4026.67046229  3487.12009823  3178.27713586  3173.92526444
  3165.93014495  3103.53201349  2703.16800011  2397.72601564   878.95206982] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 4026.67046229, last10PointsDistance.max() = 4934.9930312
------------------------------2015-07-23 16:29:15------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 8464.11739858  7924.59511856  7615.73259125  7611.37813185  7603.40482418
  7540.9145316   7140.6391671   6835.20087953  5316.38320779  4437.47521496] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-07-23 16:30:15------------------------------
last5MinsDistances = [ 39.62761163] with length 1
last10PointsDistances = [ 7890.06310387  7581.24301925  7576.89095181  7568.87147146  7506.46869209
  7106.09742084  6800.67192147  5281.90225475  4402.96592508    39.62761163] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 1
last5MinsDistances.max() = 39.6276116304, last10PointsDistance.max() = 7890.06310387
------------------------------2015-07-23 16:30:45------------------------------
last5MinsDistances = [ 11.13670234  47.64756203] with length 2
last10PointsDistances = [ 7617.92292075  7613.5671388   7605.61967014  7543.08070999  7142.86012909
  6837.41571644  5318.57818325  4439.69218732    11.13670234    47.64756203] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 2
last5MinsDistances.max() = 47.647562025, last10PointsDistance.max() = 7617.92292075
------------------------------2015-07-23 16:31:15------------------------------
last5MinsDistances = [  8.04522531  44.97978901   3.13734439] with length 3
last10PointsDistances = [ 7612.51015482  7604.55569639  7542.0298877   7141.79440155  6836.35157151
  5317.51891808  4438.62653665     8.04522531    44.97978901     3.13734439] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 44.9797890129, last10PointsDistance.max() = 7612.51015482
------------------------------2015-07-23 16:31:45------------------------------
last5MinsDistances = [ 114.11508999  114.80729217  123.72420965  121.2453555 ] with length 4
last10PointsDistances = [ 7643.77883152  7581.76943996  7181.00675218  6875.66725688  5357.30309511
  4478.41247578   114.11508999   114.80729217   123.72420965   121.2453555 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 123.724209645, last10PointsDistance.max() = 7643.77883152
------------------------------2015-07-23 16:34:16------------------------------
last5MinsDistances = [ 2621.38144562  2587.39795618  2588.17911077  2541.66347027] with length 4
last10PointsDistances = [ 10122.5580553    9721.5542338    9416.30632257   7898.3482689
   7019.58286876   2588.5975835    2621.38144562   2587.39795618
   2588.17911077   2541.66347027] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 2621.38144562, last10PointsDistance.max() = 10122.5580553
------------------------------2015-07-23 16:34:46------------------------------
last5MinsDistances = [ 2622.84003963  2588.96421713  2589.73553618  2542.8531736      8.51982615] with length 5
last10PointsDistances = [ 9722.51835119  9417.2807834   7899.37502584  7020.63076285  2590.1280066
  2622.84003963  2588.96421713  2589.73553618  2542.8531736      8.51982615] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 2622.84003963, last10PointsDistance.max() = 9722.51835119
------------------------------2015-07-23 16:46:47------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 16250.29285616  14734.76530902  13857.04283938   9433.56149375
   9466.11450261   9432.42445286   9433.19185068   9384.3585045
   6845.05644828   6843.46156519] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-07-23 16:53:47------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 14726.0740012   13847.36751574   9413.96879476   9447.48941333
   9412.34202623   9413.24345241   9369.38854264   6827.82971533
   6826.74900614    418.07173751] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-07-23 16:54:17------------------------------
last5MinsDistances = [ 12.09636479] with length 1
last10PointsDistances = [ 13843.7354529    9410.53171571   9444.02632046   9408.91852741
   9409.8162485    9365.82196755   6824.23246946   6823.13746499
    406.5818242      12.09636479] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 1
last5MinsDistances.max() = 12.0963647858, last10PointsDistance.max() = 13843.7354529
------------------------------2015-07-23 16:54:47------------------------------
last5MinsDistances = [ 33.41244351  22.12879808] with length 2
last10PointsDistances = [ 9414.29297728  9447.73850716  9412.70532242  9413.59607675  9369.33929087
  6827.70629364  6826.58423861   384.66440809    33.41244351    22.12879808] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 2
last5MinsDistances.max() = 33.4124435135, last10PointsDistance.max() = 9447.73850716
------------------------------2015-07-23 16:55:17------------------------------
last5MinsDistances = [  4.06594049  13.51992172  35.5437539 ] with length 3
last10PointsDistances = [ 9443.91178033  9408.7578226   9409.65986194  9365.82833694  6824.2752659
  6823.19700392   420.09807675     4.06594049    13.51992172    35.5437539 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 35.5437539038, last10PointsDistance.max() = 9443.91178033
------------------------------2015-07-23 16:55:47------------------------------
last5MinsDistances = [ 23.04611547  31.27035016  45.40635164  26.1113038 ] with length 4
last10PointsDistances = [ 9434.48374069  9435.38720406  9391.60747216  6850.06690227  6848.99365611
   424.48302103    23.04611547    31.27035016    45.40635164    26.1113038 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 45.4063516424, last10PointsDistance.max() = 9435.38720406
------------------------------2015-07-23 16:56:17------------------------------
last5MinsDistances = [  8.52816539  15.40275969  32.72973171  12.47672489  15.97856337] with length 5
last10PointsDistances = [ 9421.60248381  9377.72663759  6836.16268036  6835.07972054   416.25088059
     8.52816539    15.40275969    32.72973171    12.47672489    15.97856337] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 32.7297317117, last10PointsDistance.max() = 9421.60248381
------------------------------2015-07-23 16:56:47------------------------------
last5MinsDistances = [ 36.27827582  25.22366531   3.30883901  38.55383986  47.11681134
  35.10327303] with length 6
last10PointsDistances = [ 9371.06348402  6829.4262492   6828.3006966    381.81221209    36.27827582
    25.22366531     3.30883901    38.55383986    47.11681134    35.10327303] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 47.1168113411, last10PointsDistance.max() = 9371.06348402
------------------------------2015-07-23 16:57:17------------------------------
last5MinsDistances = [ 16.08919606   7.96119982  24.95463965  15.407164    37.94383354
  21.99139072  28.25650204] with length 7
last10PointsDistances = [ 6816.27864091  6815.1840669    407.17262432    16.08919606     7.96119982
    24.95463965    15.407164      37.94383354    21.99139072    28.25650204] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 7
last5MinsDistances.max() = 37.9438335404, last10PointsDistance.max() = 6816.27864091
------------------------------2015-07-23 16:57:47------------------------------
last5MinsDistances = [ 29.72226737  18.38569777   3.74310738  31.80772726  42.53469073
  29.34568929   6.91951794  21.43368999] with length 8
last10PointsDistances = [ 6826.0028459    388.37100086    29.72226737    18.38569777     3.74310738
    31.80772726    42.53469073    29.34568929     6.91951794    21.43368999] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 42.5346907328, last10PointsDistance.max() = 6826.0028459
------------------------------2015-07-23 16:58:17------------------------------
last5MinsDistances = [ 27.99758528  16.7936248    5.41522992  30.15425063  40.80022592
  27.54601241   8.43009138  20.26889699   1.79974522] with length 9
last10PointsDistances = [ 390.0794872    27.99758528   16.7936248     5.41522992   30.15425063
   40.80022592   27.54601241    8.43009138   20.26889699    1.79974522] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 40.8002259152, last10PointsDistance.max() = 390.079487197
------------------------------2015-07-23 19:40:08------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 30.04171499  23.45006389  16.56040951  33.57048353  33.12850842
  25.20132555  16.59075111  30.24797426  15.8696373   15.03960802] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-07-23 19:40:38------------------------------
last5MinsDistances = [ 22.19129662] with length 1
last10PointsDistances = [ 31.89081697   9.78988629  45.33003105  53.86027557  42.1168754
   7.01853632  34.16051581  13.52230641  15.1990222   22.19129662] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 1
last5MinsDistances.max() = 22.1912966171, last10PointsDistance.max() = 53.8602755655
Found trip end at 2015-07-23 16:54:17
------------------------------2015-07-23 19:41:08------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [] with length 0, shape (0, 30)
len(last10PointsDistances) = 0, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-07-23 19:41:38------------------------------
last5MinsDistances = [ 16.38211609] with length 1
last10PointsDistances = [ 16.38211609] with length 1, shape (1,)
len(last10PointsDistances) = 1, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-07-23 19:42:08------------------------------
last5MinsDistances = [ 11.56299815  27.65016137] with length 2
last10PointsDistances = [ 11.56299815  27.65016137] with length 2, shape (2,)
len(last10PointsDistances) = 2, len(last5MinsDistances) = 2
Too few points to make a decision, continuing
------------------------------2015-07-23 19:42:38------------------------------
last5MinsDistances = [ 20.58140871  35.74863878   9.64604673] with length 3
last10PointsDistances = [ 20.58140871  35.74863878   9.64604673] with length 3, shape (3,)
len(last10PointsDistances) = 3, len(last5MinsDistances) = 3
Too few points to make a decision, continuing
------------------------------2015-07-23 19:43:08------------------------------
last5MinsDistances = [ 10.29683167  23.00403787   8.58068619  13.20160928] with length 4
last10PointsDistances = [ 10.29683167  23.00403787   8.58068619  13.20160928] with length 4, shape (4,)
len(last10PointsDistances) = 4, len(last5MinsDistances) = 4
Too few points to make a decision, continuing
------------------------------2015-07-23 19:43:39------------------------------
last5MinsDistances = [ 29.49219646  17.28966567  40.84841388  50.07359918  38.53990063] with length 5
last10PointsDistances = [ 29.49219646  17.28966567  40.84841388  50.07359918  38.53990063] with length 5, shape (5,)
len(last10PointsDistances) = 5, len(last5MinsDistances) = 5
Too few points to make a decision, continuing
------------------------------2015-07-23 19:44:09------------------------------
last5MinsDistances = [  2.30345957  14.08955839  13.72474119  22.51073099  11.36697246
  27.63407541] with length 6
last10PointsDistances = [  2.30345957  14.08955839  13.72474119  22.51073099  11.36697246
  27.63407541] with length 6, shape (6,)
len(last10PointsDistances) = 6, len(last5MinsDistances) = 6
Too few points to make a decision, continuing
------------------------------2015-07-23 21:09:45------------------------------
last5MinsDistances = [] with length 0
last10PointsDistances = [ 190.45709611  178.50719094  201.03397818  210.64631497  200.08906368
  161.69231877  188.88233739] with length 7, shape (7,)
len(last10PointsDistances) = 7, len(last5MinsDistances) = 0
Too few points to make a decision, continuing
------------------------------2015-07-23 21:09:51------------------------------
last5MinsDistances = [ 0.42773694] with length 1
last10PointsDistances = [ 190.3927579   178.41730921  200.97973207  210.59038739  200.01682807
  161.61242042  188.81425696    0.42773694] with length 8, shape (8,)
len(last10PointsDistances) = 8, len(last5MinsDistances) = 1
Too few points to make a decision, continuing
------------------------------2015-07-23 21:10:24------------------------------
last5MinsDistances = [ 48.65584615  49.00105137] with length 2
last10PointsDistances = [ 227.50609838  217.36979168  237.26426034  246.89178038  237.56731668
  200.13234023  226.20293979   48.65584615   49.00105137] with length 9, shape (9,)
len(last10PointsDistances) = 9, len(last5MinsDistances) = 2
Too few points to make a decision, continuing
------------------------------2015-07-23 21:10:45------------------------------
last5MinsDistances = [ 77.16998204  77.38763969  37.69322761] with length 3
last10PointsDistances = [ 263.69327135  252.95136204  273.6944867   283.3375601   273.65127983
  235.81261438  262.30827743   77.16998204   77.38763969   37.69322761] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 3
last5MinsDistances.max() = 77.3876396917, last10PointsDistance.max() = 283.337560099
------------------------------2015-07-23 21:11:50------------------------------
last5MinsDistances = [ 278.37623714  278.80354058  239.4554498   245.00530371] with length 4
last10PointsDistances = [ 367.02901782  370.41268797  377.54156186  376.01005363  352.89344778
  366.99097234  278.37623714  278.80354058  239.4554498   245.00530371] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 4
last5MinsDistances.max() = 278.80354058, last10PointsDistance.max() = 377.541561862
------------------------------2015-07-23 21:12:21------------------------------
last5MinsDistances = [ 429.03301643  429.45771026  394.95975111  404.35731929  161.00029253] with length 5
last10PointsDistances = [ 475.39735869  480.35417709  482.61162572  468.92167394  475.89661712
  429.03301643  429.45771026  394.95975111  404.35731929  161.00029253] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 5
last5MinsDistances.max() = 429.457710259, last10PointsDistance.max() = 482.611625721
------------------------------2015-07-23 21:12:51------------------------------
last5MinsDistances = [ 441.26002306  441.68759858  403.98199167  409.6056003   164.85553527
   41.81178832] with length 6
last10PointsDistances = [ 508.4296075   509.85930981  493.79120828  502.56361675  441.26002306
  441.68759858  403.98199167  409.6056003   164.85553527   41.81178832] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 6
last5MinsDistances.max() = 441.68759858, last10PointsDistance.max() = 509.859309814
------------------------------2015-07-23 21:13:21------------------------------
last5MinsDistances = [ 465.50629141  465.92340198  421.34629979  416.43583166  197.81675461
  156.78654938  116.00320005] with length 7
last10PointsDistances = [ 572.95814778  550.64886003  564.20110408  465.50629141  465.92340198
  421.34629979  416.43583166  197.81675461  156.78654938  116.00320005] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 7
last5MinsDistances.max() = 465.923401984, last10PointsDistance.max() = 572.958147776
------------------------------2015-07-23 21:13:51------------------------------
last5MinsDistances = [ 463.81648351  464.23362425  419.66513601  414.78156047  196.14378696
  155.99559215  115.31954306    1.69627153] with length 8
last10PointsDistances = [ 548.98167741  562.54901109  463.81648351  464.23362425  419.66513601
  414.78156047  196.14378696  155.99559215  115.31954306    1.69627153] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 464.233624252, last10PointsDistance.max() = 562.549011091
------------------------------2015-07-23 21:14:21------------------------------
last5MinsDistances = [ 465.02514631  465.44246077  420.91221374  416.09511447  197.10045976
  155.67220641  114.89489751    1.11544754    1.48145656] with length 9
last10PointsDistances = [ 563.43110919  465.02514631  465.44246077  420.91221374  416.09511447
  197.10045976  155.67220641  114.89489751    1.11544754    1.48145656] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 465.442460772, last10PointsDistance.max() = 563.431109192
------------------------------2015-07-23 21:14:51------------------------------
last5MinsDistances = [ 420.95365578  416.1288452   197.16481572  155.76589131  114.98769881
    1.02144342    1.47374754    0.0941716 ] with length 8
last10PointsDistances = [ 465.07046556  465.48776336  420.95365578  416.1288452   197.16481572
  155.76589131  114.98769881    1.02144342    1.47374754    0.0941716 ] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 8
last5MinsDistances.max() = 420.953655777, last10PointsDistance.max() = 465.487763364
------------------------------2015-07-23 21:15:21------------------------------
last5MinsDistances = [ 423.79685352  418.77849059  200.48380401  158.69157429  117.77955157
    2.68822084    4.3403431     3.58882142    3.50536294] with length 9
last10PointsDistances = [ 468.42186347  423.79685352  418.77849059  200.48380401  158.69157429
  117.77955157    2.68822084    4.3403431     3.58882142    3.50536294] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 423.796853516, last10PointsDistance.max() = 468.421863472
------------------------------2015-07-23 21:15:30------------------------------
last5MinsDistances = [ 418.72260067  200.50893064  158.87185492  117.96645055    2.74684503
    4.37293214    3.68675805    3.60113351    0.21145499] with length 9
last10PointsDistances = [ 423.75925024  418.72260067  200.50893064  158.87185492  117.96645055
    2.74684503    4.37293214    3.68675805    3.60113351    0.21145499] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 418.72260067, last10PointsDistance.max() = 423.759250235
------------------------------2015-07-23 21:16:05------------------------------
last5MinsDistances = [ 420.05358362  426.90323234  385.98078324  270.12067124  270.90953022
  271.23454035  271.1409399   268.25121196  268.06794793] with length 9
last10PointsDistances = [ 551.241837    420.05358362  426.90323234  385.98078324  270.12067124
  270.90953022  271.23454035  271.1409399   268.25121196  268.06794793] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 426.903232345, last10PointsDistance.max() = 551.241837004
------------------------------2015-07-23 21:16:35------------------------------
last5MinsDistances = [ 200.56780459  159.9874344   119.1313528     3.35068212    4.71217418
    4.43814266    4.34487856    1.58882334    1.37795957  266.93400238] with length 10
last10PointsDistances = [ 200.56780459  159.9874344   119.1313528     3.35068212    4.71217418
    4.43814266    4.34487856    1.58882334    1.37795957  266.93400238] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
last5MinsDistances.max() = 266.934002384, last10PointsDistance.max() = 266.934002384
------------------------------2015-07-23 21:17:05------------------------------
last5MinsDistances = [ 160.26622328  119.40517067    3.637341      4.98622382    4.72520648
    4.63194792    1.79032551    1.57919038  266.65659641    0.28707334] with length 10
last10PointsDistances = [ 160.26622328  119.40517067    3.637341      4.98622382    4.72520648
    4.63194792    1.79032551    1.57919038  266.65659641    0.28707334] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
last5MinsDistances.max() = 266.656596414, last10PointsDistance.max() = 266.656596414
------------------------------2015-07-23 21:17:35------------------------------
last5MinsDistances = [ 122.03464631    6.1814513     7.33118462    7.29078309    7.19668537
    4.31321219    4.11301743  264.0273483     2.90667194    2.63000958] with length 10
last10PointsDistances = [ 122.03464631    6.1814513     7.33118462    7.29078309    7.19668537
    4.31321219    4.11301743  264.0273483     2.90667194    2.63000958] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
last5MinsDistances.max() = 264.027348303, last10PointsDistance.max() = 264.027348303
------------------------------2015-07-23 21:18:06------------------------------
last5MinsDistances = [   2.00608029    2.41594407    1.05247616    1.11785602    3.99130703
    4.13275993  272.02325067    5.10548386    5.38818436    8.00665975] with length 10
last10PointsDistances = [   2.00608029    2.41594407    1.05247616    1.11785602    3.99130703
    4.13275993  272.02325067    5.10548386    5.38818436    8.00665975] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
last5MinsDistances.max() = 272.023250667, last10PointsDistance.max() = 272.023250667
------------------------------2015-07-23 21:18:36------------------------------
last5MinsDistances = [   2.46571111    1.08191558    1.14309913    3.94786411    4.09154629
  272.00013764    5.07751465    5.35956578    7.9803884     0.07154581] with length 10
last10PointsDistances = [   2.46571111    1.08191558    1.14309913    3.94786411    4.09154629
  272.00013764    5.07751465    5.35956578    7.9803884     0.07154581] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
last5MinsDistances.max() = 272.000137644, last10PointsDistance.max() = 272.000137644
------------------------------2015-07-23 21:19:06------------------------------
last5MinsDistances = [   0.94040417    0.99718958    3.82816486    3.967934    271.85417929
    4.93609249    5.21882677    7.83726043    0.16941259    0.15667242] with length 10
last10PointsDistances = [   0.94040417    0.99718958    3.82816486    3.967934    271.85417929
    4.93609249    5.21882677    7.83726043    0.16941259    0.15667242] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
last5MinsDistances.max() = 271.854179295, last10PointsDistance.max() = 271.854179295
------------------------------2015-07-23 21:19:36------------------------------
last5MinsDistances = [   0.73484598    3.64577579    3.77675445  271.60829322    4.70361327
    4.98775107    7.59957513    0.43167766    0.43402002    0.27798732] with length 10
last10PointsDistances = [   0.73484598    3.64577579    3.77675445  271.60829322    4.70361327
    4.98775107    7.59957513    0.43167766    0.43402002    0.27798732] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
last5MinsDistances.max() = 271.60829322, last10PointsDistance.max() = 271.60829322
------------------------------2015-07-23 21:20:06------------------------------
last5MinsDistances = [   5.59186554    5.77655667  273.84302537    6.97023633    7.23610481
    9.85743597    2.26141961    2.24069858    2.39332398    2.66987977] with length 10
last10PointsDistances = [   5.59186554    5.77655667  273.84302537    6.97023633    7.23610481
    9.85743597    2.26141961    2.24069858    2.39332398    2.66987977] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 10
last5MinsDistances.max() = 273.843025373, last10PointsDistance.max() = 273.843025373
------------------------------2015-07-23 21:20:36------------------------------
last5MinsDistances = [ 270.9903373     4.31209602    4.59810972    7.11549106    1.48502033
    1.51879776    1.38090108    1.13110521    3.73474871] with length 9
last10PointsDistances = [   3.69120507  270.9903373     4.31209602    4.59810972    7.11549106
    1.48502033    1.51879776    1.38090108    1.13110521    3.73474871] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 270.990337299, last10PointsDistance.max() = 270.990337299
------------------------------2015-07-23 21:21:06------------------------------
last5MinsDistances = [ 6.97023633  7.23610481  9.85743597  2.26141961  2.24069858  2.39332398
  2.66987977  0.          3.73474871] with length 9
last10PointsDistances = [ 273.84302537    6.97023633    7.23610481    9.85743597    2.26141961
    2.24069858    2.39332398    2.66987977    0.            3.73474871] with length 10, shape (10,)
len(last10PointsDistances) = 10, len(last5MinsDistances) = 9
last5MinsDistances.max() = 9.85743596821, last10PointsDistance.max() = 273.843025373

In [128]:
ipy.inline_map(lo.get_map(pd.DataFrame(segmentation_points)))


Out[128]:

In [ ]: